Add fourth work package for REST API implementation
[anna.git] / example / diameter / launcher / resources / rest_api / ct / fsm-testing / test-ip-limit_test.py
1 import pytest
2
3
4 def test_001_i_want_to_set_the_global_ip_limit_and_then_check_it(admlc):
5
6   requestBody = { "amount":2 }
7   responseBodyRef = { "success":"true", "response":"New in-progress limit: 2" }
8
9   # Send POST
10   response = admlc.postDict("/test-ip-limit", requestBody)
11
12   # Verify response
13   admlc.assert_response__status_body_headers(response, 200, responseBodyRef)
14
15   # Now check:
16
17   requestBody = {} # -2 by default: shows current ip-limit and in-progress test cases amount
18   responseBodyRef = { "success":"true", "response":"In-progress limit amount: 2; currently there are 0 test cases running" }
19
20   # Send POST
21   response = admlc.postDict("/test-ip-limit", requestBody)
22
23   # Verify response
24   admlc.assert_response__status_body_headers(response, 200, responseBodyRef)
25