-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kenneth Kehl
committed
Jan 28, 2025
1 parent
efe9024
commit ae499fd
Showing
1 changed file
with
19 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3715,22 +3715,22 @@ def test_get_service_notification_statistics_by_day( | |
assert response == mock_data | ||
|
||
|
||
def test_valid_request(): | ||
request = MagicMock() | ||
request.args = { | ||
"service_id": "123", | ||
"name": "Test Name", | ||
"email_from": "[email protected]", | ||
} | ||
result = check_request_args(request) | ||
assert result == ("123", "Test Name", "[email protected]") | ||
|
||
|
||
def test_missing_service_id(): | ||
request = MagicMock() | ||
request.args = {"name": "Test Name", "email_from": "[email protected]"} | ||
try: | ||
check_request_args(request) | ||
except Exception as e: | ||
assert e.status_code == 400 | ||
assert {"service_id": ["Can't be empty"] in e.errors} | ||
# def test_valid_request(): | ||
# request = MagicMock() | ||
# request.args = { | ||
# "service_id": "123", | ||
# "name": "Test Name", | ||
# "email_from": "[email protected]", | ||
# } | ||
# result = check_request_args(request) | ||
# assert result == ("123", "Test Name", "[email protected]") | ||
|
||
|
||
# def test_missing_service_id(): | ||
# request = MagicMock() | ||
# request.args = {"name": "Test Name", "email_from": "[email protected]"} | ||
# try: | ||
# check_request_args(request) | ||
# except Exception as e: | ||
# assert e.status_code == 400 | ||
# assert {"service_id": ["Can't be empty"] in e.errors} |