pytest-api/tests/open_service/test_gammaworld.py

19 lines
704 B
Python

import json
import pytest
from apiclient.client import api_client
from open_service.helpers import get_expected_response
@pytest.mark.rules
def test_get_creatures(request, get_creatures_call):
expected_response = get_expected_response(request.node.name)
actual_response = api_client(get_creatures_call)
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)
actual_response = api_client(get_creature_call)
assert json.dumps(actual_response, indent=4) == json.dumps(expected_response, indent=4)