Added helpers to pytest tests
[anna.git] / example / diameter / launcher / resources / rest_api / ct / helpers / save-test-look_test.py
diff --git a/example/diameter/launcher/resources/rest_api/ct/helpers/save-test-look_test.py b/example/diameter/launcher/resources/rest_api/ct/helpers/save-test-look_test.py
new file mode 100644 (file)
index 0000000..a7376b2
--- /dev/null
@@ -0,0 +1,17 @@
+import pytest
+
+
+@pytest.mark.dynamic_helpers
+@pytest.mark.xfail(reason="To be used after dynamic mark execution")
+def test_001_save_test_look(saveB64Artifact, admlc):
+
+  # Send POST
+  response = admlc.postDict("/test-look", { "id":5000 })
+
+  # 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-look")
+