Added helpers to pytest tests
[anna.git] / example / diameter / launcher / resources / rest_api / ct / helpers / save-test-summary-states_test.py
diff --git a/example/diameter/launcher/resources/rest_api/ct/helpers/save-test-summary-states_test.py b/example/diameter/launcher/resources/rest_api/ct/helpers/save-test-summary-states_test.py
new file mode 100644 (file)
index 0000000..ad538b0
--- /dev/null
@@ -0,0 +1,16 @@
+import pytest
+
+
+@pytest.mark.helpers
+def test_001_save_test_summary_states(saveB64Artifact, admlc):
+
+  # Send GET
+  response = admlc.post("/test-summary-states")
+
+  # Verify response is ok (omit response content because it is informative and have dynamic data (timing)):
+  assert response["status"] == 200
+  assert response["body"]["success"] == "true"
+
+  # Save artifact from base64 encoded string received
+  saveB64Artifact(response["body"]["response"], "helpers/test-summary-states", False) # it is direct text content
+