From 37a42a6e344c0ff030353c13c6bf6a1717eefbaa Mon Sep 17 00:00:00 2001 From: Nathaniel Kofalt <nathaniel@kofalt.com> Date: Mon, 21 Nov 2016 16:34:24 -0600 Subject: [PATCH] Add example test case in python --- test/integration_tests/python/test_gears.py | 41 +++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 test/integration_tests/python/test_gears.py diff --git a/test/integration_tests/python/test_gears.py b/test/integration_tests/python/test_gears.py new file mode 100644 index 00000000..55323c24 --- /dev/null +++ b/test/integration_tests/python/test_gears.py @@ -0,0 +1,41 @@ +import json +import logging + +log = logging.getLogger(__name__) +sh = logging.StreamHandler() +log.addHandler(sh) + + +def test_gear_add(as_admin): + r = as_admin.post('/gears/test-case-gear', json={ + "category" : "converter", + "gear" : { + "inputs" : { + "wat" : { + "base" : "file", + "type" : { + "enum" : [ + "wat" + ] + } + } + }, + "maintainer" : "Example", + "description" : "Example", + "license" : "BSD-2-Clause", + "author" : "Example", + "url" : "https://example.example", + "label" : "wat", + "flywheel" : "0", + "source" : "https://example.example", + "version" : "0.0.1", + "config" : {}, + "name" : "test-case-gear" + }, + "exchange" : { + "git-commit" : "aex", + "rootfs-hash" : "sha384:oy", + "rootfs-url" : "https://example.example" + } + }) + assert r.ok -- GitLab