-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/tests using called_once_with (#2363)
* fix two tests * another file but the same as the first so easy peasy * more fixing * format * turn on REDIS_ENABLED * ai [review] plz * ai suggestions * replace .not_called()
- Loading branch information
Showing
7 changed files
with
26 additions
and
40 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
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
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
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 |
---|---|---|
|
@@ -66,7 +66,7 @@ def match_json(request): | |
with notify_api.app_context(): | ||
response = freshdesk.Freshdesk(ContactRequest(**contact_request)).send_ticket() | ||
assert response == 201 | ||
assert email_freshdesk_ticket_mock.not_called() | ||
email_freshdesk_ticket_mock.assert_not_called() | ||
|
||
def test_send_ticket_go_live_request(self, email_freshdesk_ticket_mock, notify_api: Flask): | ||
def match_json(request): | ||
|
@@ -117,7 +117,7 @@ def match_json(request): | |
with notify_api.app_context(): | ||
response = freshdesk.Freshdesk(ContactRequest(**data)).send_ticket() | ||
assert response == 201 | ||
assert email_freshdesk_ticket_mock.not_called() | ||
email_freshdesk_ticket_mock.assert_not_called() | ||
|
||
def test_send_ticket_branding_request(self, email_freshdesk_ticket_mock, notify_api: Flask): | ||
def match_json(request): | ||
|
@@ -179,7 +179,7 @@ def match_json(request): | |
with notify_api.app_context(): | ||
response = freshdesk.Freshdesk(ContactRequest(**data)).send_ticket() | ||
assert response == 201 | ||
assert email_freshdesk_ticket_mock.not_called() | ||
email_freshdesk_ticket_mock.assert_not_called() | ||
|
||
def test_send_ticket_other_category(self, email_freshdesk_ticket_mock, notify_api: Flask): | ||
def match_json(request): | ||
|
@@ -227,7 +227,7 @@ def match_json(request): | |
with notify_api.app_context(): | ||
response = freshdesk.Freshdesk(ContactRequest(**data)).send_ticket() | ||
assert response == 201 | ||
assert email_freshdesk_ticket_mock.not_called() | ||
email_freshdesk_ticket_mock.assert_not_called() | ||
|
||
def test_send_ticket_other(self, email_freshdesk_ticket_mock, notify_api: Flask): | ||
def match_json(request): | ||
|
@@ -258,7 +258,7 @@ def match_json(request): | |
with notify_api.app_context(): | ||
response = freshdesk.Freshdesk(ContactRequest(email_address="[email protected]")).send_ticket() | ||
assert response == 201 | ||
assert email_freshdesk_ticket_mock.not_called() | ||
email_freshdesk_ticket_mock.assert_not_called() | ||
|
||
def test_send_ticket_user_profile(self, email_freshdesk_ticket_mock, notify_api: Flask): | ||
def match_json(request): | ||
|
@@ -294,7 +294,7 @@ def match_json(request): | |
) | ||
).send_ticket() | ||
assert response == 201 | ||
assert email_freshdesk_ticket_mock.not_called() | ||
email_freshdesk_ticket_mock.assert_not_called() | ||
|
||
def test_send_ticket_freshdesk_integration_disabled(self, mocker, email_freshdesk_ticket_mock, notify_api: Flask): | ||
mocked_post = mocker.patch("requests.post") | ||
|
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
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
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