pytest-api/tests/open_service/test_gammaworld.py
Greg Gauthier a727c58cf3
All checks were successful
Pylint / build (3.12) (push) Successful in 9s
execute / build (3.12) (push) Successful in 25s
code cleanup for pylint
2024-07-22 19:26:27 +01:00

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)