Skip to content

Commit

Permalink
pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
dapineyro committed Dec 3, 2024
1 parent 199e2f9 commit 1609043
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions tests/test_clos/test_get_job_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ def test_get_job_list_correct_response():
API request is mocked and replicated with json files
"""
create_json = load_json_file(INPUT)
params = {"teamId": WORKSPACE_ID, "page": 1}
params = {"teamId": WORKSPACE_ID, "page": 1,
"archived.status": "false"}
header = {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json;charset=UTF-8",
"apikey": APIKEY
}
search_str = f"teamId={WORKSPACE_ID}&page=1"
search_str = f"teamId={WORKSPACE_ID}&page=1&archived.status=false"
# mock GET method with the .json
responses.add(
responses.GET,
Expand All @@ -54,13 +55,14 @@ def test_get_job_list_incorrect_response():
error_message = {"statusCode": 400, "code": "BadRequest",
"message": "Bad Request.", "time": "2022-11-23_17:31:07"}
error_json = json.dumps(error_message)
params = {"teamId": WORKSPACE_ID, "page": 1}
params = {"teamId": WORKSPACE_ID, "page": 1,
"archived.status": "false"}
header = {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json;charset=UTF-8",
"apikey": APIKEY
}
search_str = f"teamId={WORKSPACE_ID}&page=1"
search_str = f"teamId={WORKSPACE_ID}&page=1&archived.status=false"
# mock GET method with the .json
responses.add(
responses.GET,
Expand Down
5 changes: 3 additions & 2 deletions tests/test_errors/test_bad_request_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ def test_bad_request_exception():
API request is mocked and replicated with json files
"""
create_json = load_json_file(INPUT)
params = {"teamId": WORKSPACE_ID, "page": 1}
params = {"teamId": WORKSPACE_ID, "page": 1,
"archived.status": "false"}
header = {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json;charset=UTF-8",
"apikey": APIKEY
}
search_str = f"teamId={WORKSPACE_ID}&page=1"
search_str = f"teamId={WORKSPACE_ID}&page=1&archived.status=false"
# mock GET method with the .json
responses.add(
responses.GET,
Expand Down

0 comments on commit 1609043

Please sign in to comment.