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:
Chris Hill-Scott
2020-08-28 13:26:14 +01:00
parent d446a91a8e
commit 1e55a8cbbe
8 changed files with 29 additions and 29 deletions

View File

@@ -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