74 lines
1.9 KiB
Python
74 lines
1.9 KiB
Python
|
import pytest
|
||
|
from apiclient.config import get_cfg
|
||
|
from apiclient.oauth_helper import get_legacy_token
|
||
|
|
||
|
|
||
|
ENV = 'qa' # 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
|
||
|
|
||
|
|
||
|
@pytest.fixture
|
||
|
def role_get_call():
|
||
|
token = get_legacy_token(ENV)
|
||
|
api_call = {
|
||
|
"token": token,
|
||
|
"method": "GET",
|
||
|
"url": CFG["api_url"] + '/data-delivery/role',
|
||
|
"headers": {'Content-Type': 'application/json'},
|
||
|
"body": {"application_id": 1}
|
||
|
}
|
||
|
return api_call
|
||
|
|
||
|
|
||
|
@pytest.fixture
|
||
|
def acms_redaction_get_call():
|
||
|
token = get_legacy_token(ENV)
|
||
|
api_call = {
|
||
|
"token": token,
|
||
|
"method": "GET",
|
||
|
"url": CFG["api_url"] + '/data-delivery/acmsredaction',
|
||
|
"headers": {'Content-Type': 'application/json'},
|
||
|
"body": {"redaction_id": 1}
|
||
|
}
|
||
|
return api_call
|
||
|
|
||
|
|
||
|
@pytest.fixture
|
||
|
def client_applications_get_call():
|
||
|
token = get_legacy_token(ENV)
|
||
|
api_call = {
|
||
|
"token": token,
|
||
|
"method": "GET",
|
||
|
"url": CFG["api_url"] + '/data-delivery/client-applications',
|
||
|
"headers": {'Content-Type': 'application/json'},
|
||
|
"body": {}
|
||
|
}
|
||
|
return api_call
|
||
|
|
||
|
@pytest.fixture
|
||
|
def endpoint_get_call():
|
||
|
token = get_legacy_token(ENV)
|
||
|
api_call = {
|
||
|
"token": token,
|
||
|
"method": "GET",
|
||
|
"url": CFG["api_url"] + '/data-delivery/endpoint',
|
||
|
"headers": {'Content-Type': 'application/json'},
|
||
|
"body": {
|
||
|
"endpoint_id": 1001
|
||
|
}
|
||
|
}
|
||
|
return api_call
|
||
|
|
||
|
|
||
|
@pytest.fixture
|
||
|
def redaction_type_get_call():
|
||
|
token = get_legacy_token(ENV)
|
||
|
api_call = {
|
||
|
"token": token,
|
||
|
"method": "GET",
|
||
|
"url": CFG["api_url"] + '/data-delivery/redactiontype',
|
||
|
"headers": {'Content-Type': 'application/json'},
|
||
|
"body": {}
|
||
|
}
|
||
|
return api_call
|