celery test cleanup

* Alter config so an error will be raised if you forget to mock out a
  celery call in one of your tests
* Remove an unneeded exception type that was masking errors
This commit is contained in:
Leo Hemsted
2017-06-19 14:58:38 +01:00
parent 88a479a4bb
commit ac7665bfc6
8 changed files with 16 additions and 33 deletions

View File

@@ -2247,7 +2247,9 @@ def test_fetch_service_inbound_api(client, sample_service):
assert json.loads(response.get_data(as_text=True))["data"] == service_inbound_api.serialize()
def test_send_one_off_notification(admin_request, sample_template):
def test_send_one_off_notification(admin_request, sample_template, mocker):
mocker.patch('app.service.send_notification.send_notification_to_queue')
response = admin_request.post(
'service.create_one_off_notification',
service_id=sample_template.service_id,