pytest-api/tests/open_service/conftest.py

30 lines
742 B
Python
Raw Normal View History

2024-07-20 16:35:15 +00:00
import pytest
from apiclient.config import get_cfg
ENV = 'gw' # This would be set in an actual OS env var on the execution platform
CFG = get_cfg(ENV) # needed for the token, and the full api url
application_json = {'Content-Type': 'application/json'}
@pytest.fixture
def get_creatures_call():
api_call = {
"method": "GET",
"url": CFG["api_url"] + '/rules/creature',
"headers": application_json,
"body": {}
}
return api_call
@pytest.fixture
def get_creature_call():
api_call = {
"method": "GET",
"url": CFG["api_url"] + '/rules/creature',
"headers": application_json,
"body": {"creature": "badder"}
}
return api_call