Skip to content

Commit 9d64382

Browse files
Added testing headers (#54)
1 parent a4a8f9f commit 9d64382

File tree

5 files changed

+11
-0
lines changed

5 files changed

+11
-0
lines changed

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[flake8]
22
max-line-length=99
3+
4+
[metadata]
5+
license_files = LICENSE.md

workflow_tests/test_create_content.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ def client():
174174
host=os.environ["API_HOST"], api_key={"key": os.environ["API_KEY"]}
175175
)
176176
api_client = lilt.ApiClient(configuration)
177+
api_client.set_default_header("x-is-automated-test", True)
178+
api_client.set_default_header("x-is-expected-error", True)
177179
commit = os.environ.get("GIT_COMMIT_SHA", "no_version_available")
178180
api_client.user_agent = f"lilt-python-e2e-tests/{commit}"
179181
return api_client

workflow_tests/test_data_source.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ def client():
204204
host=os.environ["API_HOST"], api_key={"key": os.environ["API_KEY"]}
205205
)
206206
api_client = lilt.ApiClient(configuration)
207+
api_client.set_default_header("x-is-automated-test", True)
208+
api_client.set_default_header("x-is-expected-error", True)
207209
commit = os.environ.get("GIT_COMMIT_SHA", "no_version_available")
208210
api_client.user_agent = f"lilt-python-e2e-tests/{commit}"
209211
return api_client

workflow_tests/test_instant_translate.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ def client():
4040
host=os.environ["API_HOST"], api_key={"key": os.environ["API_KEY"]}
4141
)
4242
api_client = lilt.ApiClient(configuration)
43+
api_client.set_default_header("x-is-automated-test", True)
44+
api_client.set_default_header("x-is-expected-error", True)
4345
commit = os.environ.get("GIT_COMMIT_SHA", "no_version_available")
4446
api_client.user_agent = f"lilt-python-e2e-tests/{commit}"
4547
return api_client

workflow_tests/test_verified_translate.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def client():
2323
host=os.environ["API_HOST"], api_key={"key": os.environ["API_KEY"]}
2424
)
2525
api_client = lilt.ApiClient(configuration)
26+
api_client.set_default_header("x-is-automated-test", True)
27+
api_client.set_default_header("x-is-expected-error", True)
2628
commit = os.environ.get("GIT_COMMIT_SHA", "no_version_available")
2729
api_client.user_agent = f"lilt-python-e2e-tests/{commit}"
2830
return api_client

0 commit comments

Comments
 (0)