Add fourth work package for REST API implementation
[anna.git] / example / diameter / launcher / resources / rest_api / ct / fsm-testing / test-repeats_test.py
diff --git a/example/diameter/launcher/resources/rest_api/ct/fsm-testing/test-repeats_test.py b/example/diameter/launcher/resources/rest_api/ct/fsm-testing/test-repeats_test.py
new file mode 100644 (file)
index 0000000..337b1fe
--- /dev/null
@@ -0,0 +1,19 @@
+import pytest
+
+
+def test_001_i_want_to_repeat_the_test_pool_forever(admlc):
+
+  response = admlc.postDict("/test-repeats", { "amount": -1 })
+
+  # Verify response
+  responseBodyRef = { "success":"true", "response":"Pool repeats: -1 [no limit] (current cycle: 1)" }
+  admlc.assert_response__status_body_headers(response, 200, responseBodyRef)
+
+def test_002_i_want_to_disable_test_pool_cycle_repeats(admlc):
+
+  response = admlc.postDict("/test-repeats", { "amount":0 })
+
+  # Verify response
+  responseBodyRef = { "success":"true", "response":"Pool repeats: 0 (current cycle: 1)" }
+  admlc.assert_response__status_body_headers(response, 200, responseBodyRef)
+