From 9ad75ff726a25280bec870c2590bedae4ee67ace Mon Sep 17 00:00:00 2001 From: venusbb Date: Wed, 27 Sep 2017 10:15:29 +0100 Subject: [PATCH] Tests modified --- .../app/authentication/test_authentication.py | 2 -- .../app/notifications/rest/test_callbacks.py | 24 ------------------- 2 files changed, 26 deletions(-) diff --git a/tests/app/authentication/test_authentication.py b/tests/app/authentication/test_authentication.py index 1e3ed8637..cec191a13 100644 --- a/tests/app/authentication/test_authentication.py +++ b/tests/app/authentication/test_authentication.py @@ -338,7 +338,6 @@ def test_allow_valid_ips(restrict_ip_sms_app): assert response.status_code == 200 -# @pytest.mark.xfail(reason='Currently not blocking invalid IPs', strict=True) def test_reject_invalid_ips(restrict_ip_sms_app): with pytest.raises(AuthError) as exc_info: restrict_ip_sms_app.get( @@ -351,7 +350,6 @@ def test_reject_invalid_ips(restrict_ip_sms_app): assert exc_info.value.short_message == 'Unknown source IP address from the SMS provider' -# @pytest.mark.xfail(reason='Currently not blocking invalid senders', strict=True) def test_illegitimate_ips(restrict_ip_sms_app): with pytest.raises(AuthError) as exc_info: restrict_ip_sms_app.get( diff --git a/tests/app/notifications/rest/test_callbacks.py b/tests/app/notifications/rest/test_callbacks.py index 6024f12ac..03fede0fa 100644 --- a/tests/app/notifications/rest/test_callbacks.py +++ b/tests/app/notifications/rest/test_callbacks.py @@ -255,30 +255,6 @@ def test_firetext_callback_should_update_notification_status_pending(client, not assert get_notification_by_id(notification.id).status == 'pending' -def test_firetext_callback_should_update_multiple_notification_status_sent( - client, - notify_db, - notify_db_session, - mocker -): - mocker.patch('app.statsd_client.incr') - notification1 = create_sample_notification( - notify_db, notify_db_session, status='sending', sent_at=datetime.utcnow() - ) - notification2 = create_sample_notification( - notify_db, notify_db_session, status='sending', sent_at=datetime.utcnow() - ) - notification3 = create_sample_notification( - notify_db, notify_db_session, status='sending', sent_at=datetime.utcnow() - ) - data = 'mobile=441234123123&status=0&time=2016-03-10 14:17:00&reference={}'.format( - notification1.id) - - firetext_post(client, data) - firetext_post(client, data) - firetext_post(client, data) - - def test_process_mmg_response_return_200_when_cid_is_send_sms_code(client): data = '{"reference": "10100164", "CID": "send-sms-code", "MSISDN": "447775349060", "status": "3", \ "deliverytime": "2016-04-05 16:01:07"}'