Add second work package for REST API implementation
[anna.git] / example / diameter / launcher / resources / rest_api / ct / parsing-operations / loadmsg_test.py
1 import pytest
2
3
4 def test_001_given_diameter_json_representation_i_want_to_load_it_through_adml_service(b64_encode, resources, admlc):
5
6   requestBody = resources("aar-diameterJson-request.json")
7
8   # reponse field in response body, should carry the base64 encoding for xml message loaded by ADML:
9   xmlExpected = resources("aar.xml")
10   responseBodyRef = { "success":"true", "response":"{}".format(b64_encode(xmlExpected)) }
11
12   # Send POST
13   response = admlc.post("/loadmsg", requestBody)
14
15   ### Verify response
16   admlc.assert_response__status_body_headers(response, 200, responseBodyRef)