From ac08ca855ccdb86b201410dd04cf4a6d5adf1486 Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Sat, 20 Jul 2024 16:30:36 +0100 Subject: [PATCH] update gitignore --- .gitignore | 5 +++++ tests/conftest.py | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index cdbe354..7ddf915 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,9 @@ +# IDES .idea/ +.vs/ +.vscode/ + +# PYTHON .venv/ **/__pycache__/ **/.env* diff --git a/tests/conftest.py b/tests/conftest.py index 1c2c662..75e01d4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,10 +2,11 @@ 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 +application_json = {'Content-Type': 'application/json'} + @pytest.fixture def role_get_call(): @@ -14,7 +15,7 @@ def role_get_call(): "token": token, "method": "GET", "url": CFG["api_url"] + '/data-delivery/role', - "headers": {'Content-Type': 'application/json'}, + "headers": application_json, "body": {"application_id": 1} } return api_call @@ -27,7 +28,7 @@ def acms_redaction_get_call(): "token": token, "method": "GET", "url": CFG["api_url"] + '/data-delivery/acmsredaction', - "headers": {'Content-Type': 'application/json'}, + "headers": application_json, "body": {"redaction_id": 1} } return api_call @@ -40,11 +41,12 @@ def client_applications_get_call(): "token": token, "method": "GET", "url": CFG["api_url"] + '/data-delivery/client-applications', - "headers": {'Content-Type': 'application/json'}, + "headers": application_json, "body": {} } return api_call + @pytest.fixture def endpoint_get_call(): token = get_legacy_token(ENV) @@ -52,7 +54,7 @@ def endpoint_get_call(): "token": token, "method": "GET", "url": CFG["api_url"] + '/data-delivery/endpoint', - "headers": {'Content-Type': 'application/json'}, + "headers": application_json, "body": { "endpoint_id": 1001 } @@ -67,7 +69,7 @@ def redaction_type_get_call(): "token": token, "method": "GET", "url": CFG["api_url"] + '/data-delivery/redactiontype', - "headers": {'Content-Type': 'application/json'}, + "headers": application_json, "body": {} } return api_call