aboutsummaryrefslogtreecommitdiffstats
path: root/moon_manager/tests
diff options
context:
space:
mode:
Diffstat (limited to 'moon_manager/tests')
-rw-r--r--moon_manager/tests/functional_pod/run_functional_tests.sh7
-rw-r--r--moon_manager/tests/unit_python/api/test_models.py9
2 files changed, 16 insertions, 0 deletions
diff --git a/moon_manager/tests/functional_pod/run_functional_tests.sh b/moon_manager/tests/functional_pod/run_functional_tests.sh
index 7a95a491..960e9480 100644
--- a/moon_manager/tests/functional_pod/run_functional_tests.sh
+++ b/moon_manager/tests/functional_pod/run_functional_tests.sh
@@ -1,4 +1,11 @@
#!/usr/bin/env bash
+if [ -d /data/dist ];
+then
+ pip install /data/dist/*.tar.gz --upgrade
+ pip install /data/dist/*.whl --upgrade
+fi
+
+
cd /data/tests/functional_pod
pytest .
diff --git a/moon_manager/tests/unit_python/api/test_models.py b/moon_manager/tests/unit_python/api/test_models.py
index 3c205d1d..b80e19f4 100644
--- a/moon_manager/tests/unit_python/api/test_models.py
+++ b/moon_manager/tests/unit_python/api/test_models.py
@@ -34,6 +34,14 @@ def delete_models_without_id(client):
return req
+def clean_models():
+ client = utilities.register_client()
+ req, models= get_models(client)
+ for key, value in models['models'].items():
+ print(key)
+ print(value)
+ client.delete("/models/{}".format(key))
+
def test_get_models():
client = utilities.register_client()
req, models= get_models(client)
@@ -43,6 +51,7 @@ def test_get_models():
def test_add_models():
+ clean_models()
client = utilities.register_client()
req, models = add_models(client, "testuser")
assert req.status_code == 200