23 lines
787 B
Python
23 lines
787 B
Python
import json
|
|
|
|
import pytest
|
|
|
|
from apiclient.client import api_client
|
|
from tests.helpers import get_expected_response
|
|
|
|
pkg_name = __package__.split('.')[1]
|
|
|
|
|
|
@pytest.mark.rules
|
|
def test_get_creatures(request, get_creatures_call):
|
|
expected_response = get_expected_response(pkg_name, request.node.name)
|
|
actual_response = api_client(get_creatures_call, oauth=False)
|
|
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(pkg_name, request.node.name)
|
|
actual_response = api_client(get_creature_call, oauth=False)
|
|
assert json.dumps(actual_response, indent=4) == json.dumps(expected_response, indent=4)
|