From 30f7377d7e4aa4aa46cc7ec2627ba01e285a0636 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 19 Jul 2016 16:16:12 +0100 Subject: [PATCH] Fix tests --- tests/app/clients/test_mmg.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/app/clients/test_mmg.py b/tests/app/clients/test_mmg.py index 9410c29b0..ee56518fb 100644 --- a/tests/app/clients/test_mmg.py +++ b/tests/app/clients/test_mmg.py @@ -33,7 +33,7 @@ def test_send_sms_successful_returns_mmg_response(mocker, mock_mmg_client): response_dict = {'Reference': 12345678} with requests_mock.Mocker() as request_mock: - request_mock.post('https://www.mmgrp.co.uk/API/json/api.php', json=response_dict, status_code=200) + request_mock.post('https://api.mmg.co.uk/json/api.php', json=response_dict, status_code=200) response = mock_mmg_client.send_sms(to, content, reference) response_json = response.json() @@ -48,11 +48,11 @@ def test_send_sms_calls_mmg_correctly(mocker, mock_mmg_client): response_dict = {'Reference': 12345678} with requests_mock.Mocker() as request_mock: - request_mock.post('https://www.mmgrp.co.uk/API/json/api.php', json=response_dict, status_code=200) + request_mock.post('https://api.mmg.co.uk/json/api.php', json=response_dict, status_code=200) mock_mmg_client.send_sms(to, content, reference) assert request_mock.call_count == 1 - assert request_mock.request_history[0].url == 'https://www.mmgrp.co.uk/API/json/api.php' + assert request_mock.request_history[0].url == 'https://api.mmg.co.uk/json/api.php' assert request_mock.request_history[0].method == 'POST' request_args = request_mock.request_history[0].json() @@ -72,7 +72,7 @@ def test_send_sms_raises_if_mmg_rejects(mocker, mock_mmg_client): } with pytest.raises(MMGClientException) as exc, requests_mock.Mocker() as request_mock: - request_mock.post('https://www.mmgrp.co.uk/API/json/api.php', json=response_dict, status_code=400) + request_mock.post('https://api.mmg.co.uk/json/api.php', json=response_dict, status_code=400) mock_mmg_client.send_sms(to, content, reference) assert exc.value.code == 206 @@ -87,7 +87,7 @@ def test_send_sms_override_configured_shortcode_with_sender(mocker, mock_mmg_cli sender = 'fromservice' with requests_mock.Mocker() as request_mock: - request_mock.post('https://www.mmgrp.co.uk/API/json/api.php', json=response_dict, status_code=200) + request_mock.post('https://api.mmg.co.uk/json/api.php', json=response_dict, status_code=200) mock_mmg_client.send_sms(to, content, reference, sender=sender) request_args = request_mock.request_history[0].json()