mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 04:33:13 -04:00
Remove uses of .assert_not_called
I prefer to avoid `assert_not_called`, because if I make a typo like
this, the tests will still pass:
```
app.invite_api_client.create_invite.asset_not_called()
```
It’s harder to have a false positive with the statement written this
way:
```
assert app.invite_api_client.create_invite.called is False
```
This commit is contained in:
@@ -642,7 +642,7 @@ def test_dont_cancel_letter_job_when_to_early_to_cancel(
|
||||
job_id=str(job_id),
|
||||
_expected_status=200,
|
||||
)
|
||||
mock_cancel.assert_not_called()
|
||||
assert mock_cancel.called is False
|
||||
flash_message = normalize_spaces(page.find('div', class_='banner-dangerous').text)
|
||||
|
||||
assert 'We are still processing these letters, please try again in a minute.' in flash_message
|
||||
|
||||
Reference in New Issue
Block a user