Add first work package for REST API implementation
[anna.git] / example / diameter / launcher / resources / rest_api / ct / parsing-operations / code_test.py
diff --git a/example/diameter/launcher/resources/rest_api/ct/parsing-operations/code_test.py b/example/diameter/launcher/resources/rest_api/ct/parsing-operations/code_test.py
new file mode 100644 (file)
index 0000000..226cdae
--- /dev/null
@@ -0,0 +1,15 @@
+import pytest
+
+def test_001_given_diameter_json_representation_i_want_to_encode_it_through_adml_service(resources, admlc):
+
+  requestBody = resources("diameterJson-request.json")
+
+  # reponse field in response body, should carry the diameter encoding for json message sent to ADML:
+  diameterHex = resources("aar.hex")
+  responseBodyRef = { "success":"true", "response":"{}".format(diameterHex.rstrip()) }
+
+  # Send POST
+  response = admlc.post("/code", requestBody)
+
+  ### Verify response
+  admlc.assert_response__status_body_headers(response, 200, responseBodyRef)