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

@@ -854,7 +854,7 @@ def test_get_notifications_sent_by_service_validates_form(mocker, client_request
for error in errors:
assert 'Not a valid date value' in error.text
mock_get_stats_from_api.assert_not_called()
assert mock_get_stats_from_api.called is False
def test_usage_for_all_services_when_no_results_for_date(client_request, platform_admin_user, mocker):