Merge pull request #618 from GSA/notify-api-340

notify-api-340 remove daily limit
This commit is contained in:
Kenneth Kehl
2023-07-18 07:00:09 -07:00
committed by GitHub
5 changed files with 5 additions and 35 deletions

View File

@@ -18,27 +18,12 @@ def test_renders(client_request, mocker, query_args, result):
assert response.get_data(as_text=True) == 'rendered'
def test_displays_govuk_branding_by_default(client_request):
page = client_request.get('main.email_template', _test_page_title=False)
assert page.find("a", attrs={"href": "https://www.gov.uk"})
def test_displays_govuk_branding(client_request, mock_get_email_branding_with_govuk_brand_type):
page = client_request.get('main.email_template', branding_style="1", _test_page_title=False)
assert page.find("a", attrs={"href": "https://www.gov.uk"})
def test_displays_both_branding(client_request, mock_get_email_branding_with_both_brand_type):
page = client_request.get('main.email_template', branding_style="1", _test_page_title=False)
mock_get_email_branding_with_both_brand_type.assert_called_once_with('1')
assert page.find("a", attrs={"href": "https://www.gov.uk"})
assert page.find("img", attrs={"src": re.compile("example.png$")})
assert page.select("body > table:nth-of-type(3) table > tr:nth-of-type(1) > td:nth-of-type(2)")[0]\
.get_text().strip() == 'Organization text' # brand text is set

View File

@@ -1751,7 +1751,7 @@ def test_upload_csvfile_with_valid_phone_shows_all_numbers(
assert '202 867 0750' not in page.text
assert 'Only showing the first 50 rows' in page.text
mock_get_notification_count.assert_called_with(service_id=service_one['id'])
mock_get_notification_count.assert_called_with(service_one['id'])
@pytest.mark.parametrize('international_sms_permission, should_allow_international', [
@@ -2084,7 +2084,8 @@ def test_check_messages_back_link(
@pytest.mark.parametrize('num_requested,expected_msg', [
(None, 'example.csv contains 1,234 phone numbers.'),
("0", 'example.csv contains 1,234 phone numbers.'),
("1", 'You can still send 49 messages today, but example.csv contains 1,234 phone numbers.')
# This used to trigger the too many messages errors but we removed the daily limit
("1", 'example.csv contains 1,234 phone numbers.')
], ids=['none_sent', 'none_sent', 'some_sent'])
def test_check_messages_shows_too_many_messages_errors(
mocker,