aboutsummaryrefslogtreecommitdiffstats
path: root/moon_orchestrator/tests/unit_python/test_slaves.py
diff options
context:
space:
mode:
authorThomas Duval <thomas.duval@orange.com>2018-01-15 21:12:32 +0100
committerThomas Duval <thomas.duval@orange.com>2018-01-15 21:12:32 +0100
commitba90e446c6d5a51c9ed392416f90b7bb56d11603 (patch)
treed4f2f02ace9af594fbe6abce3824cfb494ece998 /moon_orchestrator/tests/unit_python/test_slaves.py
parent1da8f2e5f28813a90ecc329462dcc647ce757494 (diff)
Add th ability to (un)load wrapper components through API
Change-Id: I58a25dbc0479e416d471115885dab7ccfb27e18a
Diffstat (limited to 'moon_orchestrator/tests/unit_python/test_slaves.py')
-rw-r--r--moon_orchestrator/tests/unit_python/test_slaves.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/moon_orchestrator/tests/unit_python/test_slaves.py b/moon_orchestrator/tests/unit_python/test_slaves.py
new file mode 100644
index 00000000..88ff7e55
--- /dev/null
+++ b/moon_orchestrator/tests/unit_python/test_slaves.py
@@ -0,0 +1,17 @@
+import json
+from mock_pods import patch_k8s
+from utilities import get_json
+
+
+def test_get_slaves(context, monkeypatch):
+ patch_k8s(monkeypatch)
+
+ import moon_orchestrator.server
+ server = moon_orchestrator.server.create_server()
+ _client = server.app.test_client()
+ req = _client.get("/slaves")
+ assert req.status_code == 200
+ assert req.data
+ data = get_json(req.data)
+ assert isinstance(data, dict)
+ assert "slaves" in data