add additional example tests
This commit is contained in:
parent
289f84f8a4
commit
cc95e12d20
@ -0,0 +1 @@
|
||||
[]
|
@ -0,0 +1,42 @@
|
||||
[
|
||||
{
|
||||
"ClientId" : "e72cdfde-957a-4f65-9f5e-c7b18e95d8dc",
|
||||
"ClientSecret" : "f4ca195c-989c-48e6-a002-b1fb7b3c03fd",
|
||||
"IsActive" : 1,
|
||||
"Name" : "testcase",
|
||||
"date_of_generation" : "2024-04-25 04:48:47",
|
||||
"id" : 1,
|
||||
"last_connection" : null,
|
||||
"organization_id" : 16
|
||||
},
|
||||
{
|
||||
"ClientId" : "b0dd74c2-9f39-45fc-a52e-b1130ffddbb5",
|
||||
"ClientSecret" : "71b2ab0e-d3fa-40e2-a40e-2088ae716a46",
|
||||
"IsActive" : 1,
|
||||
"Name" : "Test",
|
||||
"date_of_generation" : "2024-05-20 07:22:31",
|
||||
"id" : 2,
|
||||
"last_connection" : null,
|
||||
"organization_id" : 1
|
||||
},
|
||||
{
|
||||
"ClientId" : "be1a0686-fed2-4d79-a04c-c473c6c3e22e",
|
||||
"ClientSecret" : "ddfdaee7-1fe5-4f62-964c-cb2b8e8397e1",
|
||||
"IsActive" : 1,
|
||||
"Name" : "Test3",
|
||||
"date_of_generation" : "2024-05-20 10:58:35",
|
||||
"id" : 3,
|
||||
"last_connection" : null,
|
||||
"organization_id" : 1
|
||||
},
|
||||
{
|
||||
"ClientId" : "37f7afc6-91a1-4c2d-9696-0e8db6fc1bc6",
|
||||
"ClientSecret" : "40106ff7-7feb-4869-b4c9-eeed5dee2f36",
|
||||
"IsActive" : 1,
|
||||
"Name" : "test4",
|
||||
"date_of_generation" : "2024-05-20 11:14:16",
|
||||
"id" : 4,
|
||||
"last_connection" : null,
|
||||
"organization_id" : 1
|
||||
}
|
||||
]
|
@ -11,7 +11,7 @@ CFG = get_cfg(ENV)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def api_call():
|
||||
def role_get_call():
|
||||
token = get_legacy_token(ENV)
|
||||
api_call = {
|
||||
"token": token,
|
||||
@ -23,8 +23,45 @@ def api_call():
|
||||
return api_call
|
||||
|
||||
|
||||
def test_datadelivery_role_get(request, api_call):
|
||||
expected_response = get_expected_response(request.node.name)
|
||||
actual_response = api_client(api_call)
|
||||
@pytest.fixture
|
||||
def acms_redaction_get_call():
|
||||
token = get_legacy_token(ENV)
|
||||
api_call = {
|
||||
"token": token,
|
||||
"method": "GET",
|
||||
"url": CFG["api_url"] + '/data-delivery/acmsredaction',
|
||||
"headers": {'Content-Type': 'application/json'},
|
||||
"body": {"redaction_id": 1}
|
||||
}
|
||||
return api_call
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client_applications_get_call():
|
||||
token = get_legacy_token(ENV)
|
||||
api_call = {
|
||||
"token": token,
|
||||
"method": "GET",
|
||||
"url": CFG["api_url"] + '/data-delivery/client-applications',
|
||||
"headers": {'Content-Type': 'application/json'},
|
||||
"body": {}
|
||||
}
|
||||
return api_call
|
||||
|
||||
|
||||
def test_datadelivery_role_get(request, role_get_call):
|
||||
expected_response = get_expected_response(request.node.name)
|
||||
actual_response = api_client(role_get_call)
|
||||
assert json.dumps(actual_response, indent=4) == json.dumps(expected_response, indent=4)
|
||||
|
||||
|
||||
def test_datadelivery_acms_redaction_get(request, acms_redaction_get_call):
|
||||
expected_response = get_expected_response(request.node.name)
|
||||
actual_response = api_client(acms_redaction_get_call)
|
||||
assert json.dumps(actual_response, indent=4) == json.dumps(expected_response, indent=4)
|
||||
|
||||
|
||||
def test_datadelivery_client_applications_get(request, client_applications_get_call):
|
||||
expected_response = get_expected_response(request.node.name)
|
||||
actual_response = api_client(client_applications_get_call)
|
||||
assert json.dumps(actual_response, indent=4) == json.dumps(expected_response, indent=4)
|
||||
|
Loading…
Reference in New Issue
Block a user