mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-19 05:58:53 -04:00
fix tests that expect to be rate limited (which is off if redis is disabled)
This commit is contained in:
@@ -2163,18 +2163,17 @@ def test_search_for_notification_by_to_field_returns_content(
|
||||
assert notifications[0]['template']['content'] == 'Hello (( Name))\nYour thing is due soon'
|
||||
|
||||
|
||||
def test_send_one_off_notification(admin_request, mocker):
|
||||
service = create_service()
|
||||
template = create_template(service=service)
|
||||
def test_send_one_off_notification(sample_service, admin_request, mocker):
|
||||
template = create_template(service=sample_service)
|
||||
mocker.patch('app.service.send_notification.send_notification_to_queue')
|
||||
|
||||
response = admin_request.post(
|
||||
'service.create_one_off_notification',
|
||||
service_id=service.id,
|
||||
service_id=sample_service.id,
|
||||
_data={
|
||||
'template_id': str(template.id),
|
||||
'to': '07700900001',
|
||||
'created_by': str(service.created_by_id)
|
||||
'created_by': str(sample_service.created_by_id)
|
||||
},
|
||||
_expected_status=201
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user