2024-07-20 16:35:15 +00:00
|
|
|
import json
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
from apiclient.client import api_client
|
2024-07-20 19:17:47 +00:00
|
|
|
from tests.open_service.helpers import get_expected_response
|
2024-07-20 16:35:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.rules
|
|
|
|
def test_get_creatures(request, get_creatures_call):
|
|
|
|
expected_response = get_expected_response(request.node.name)
|
2024-07-20 19:17:47 +00:00
|
|
|
actual_response = api_client(get_creatures_call, oauth=False)
|
2024-07-20 16:35:15 +00:00
|
|
|
assert json.dumps(actual_response, indent=4) == json.dumps(expected_response, indent=4)
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.rules
|
|
|
|
def test_get_creature(request, get_creature_call):
|
|
|
|
expected_response = get_expected_response(request.node.name)
|
2024-07-20 19:17:47 +00:00
|
|
|
actual_response = api_client(get_creature_call, oauth=False)
|
2024-07-20 16:35:15 +00:00
|
|
|
assert json.dumps(actual_response, indent=4) == json.dumps(expected_response, indent=4)
|