Add ct automation
[anna.git] / example / diameter / launcher / resources / rest_api / ct / hot-changes / services_test.py
1 import pytest
2
3 @pytest.mark.skip(reason="this is run as part of 'ct.sh' wrapper script")
4 @pytest.mark.run(order=1)
5 @pytest.mark.xfail(reason="This will fail if already provisioned (if you want success here, restart the ADML HTTP Service)")
6 def test_001_given_services_json_representation_i_want_to_load_it_through_adml_service(resources, admlc):
7
8   requestBody = resources("servicesJson-request.json")
9   responseBodyRef = { "success":"true", "response":"loaded services correctly" }
10
11   # Send POST
12   response = admlc.post("/services", requestBody)
13
14   ### Verify response
15   admlc.assert_response__status_body_headers(response, 200, responseBodyRef)
16
17 def test_002_given_dummy_services_json_representation_i_want_to_load_it_through_adml_service(resources, admlc):
18
19   requestBody = resources("servicesDummyJson-request.json")
20   responseBodyRef = { "success":"true", "response":"loaded services correctly" }
21
22   # Send POST
23   response = admlc.post("/services", requestBody)
24
25   ### Verify response
26   admlc.assert_response__status_body_headers(response, 200, responseBodyRef)
27