Skip to content

Commit

Permalink
feat: update config and text (#1998)
Browse files Browse the repository at this point in the history
* feat: update config and  text

* fix limits in test files

* chore: add comma to daily limit content
  • Loading branch information
andrewleith authored Nov 20, 2024
1 parent cf99ac3 commit 4b4ac2b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ class Config(object):
FF_RTL = env.bool("FF_RTL", True)
FF_ANNUAL_LIMIT = env.bool("FF_ANNUAL_LIMIT", True)

FREE_YEARLY_EMAIL_LIMIT = env.int("FREE_YEARLY_EMAIL_LIMIT", 10_000_000)
FREE_YEARLY_SMS_LIMIT = env.int("FREE_YEARLY_SMS_LIMIT", 25_000)
FREE_YEARLY_EMAIL_LIMIT = env.int("FREE_YEARLY_EMAIL_LIMIT", 20_000_000)
FREE_YEARLY_SMS_LIMIT = env.int("FREE_YEARLY_SMS_LIMIT", 100_000)
GC_ARTICLES_API = os.environ.get("GC_ARTICLES_API", "articles.alpha.canada.ca/notification-gc-notify")
GC_ARTICLES_API_AUTH_PASSWORD = os.environ.get("GC_ARTICLES_API_AUTH_PASSWORD")
GC_ARTICLES_API_AUTH_USERNAME = os.environ.get("GC_ARTICLES_API_AUTH_USERNAME")
Expand Down
4 changes: 2 additions & 2 deletions app/templates/components/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h2 class="heading-medium">{{ _(headings[1].title) }}</h2>
<p><strong>{{ _('Daily limit per service:') }}</strong></p>
</div>
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p>{{ _('10,000 emails<br />1000 text messages') }}</p>
<p>{{ _('10,000 emails<br />1,000 text messages') }}</p>
</div>
</div>

Expand All @@ -66,7 +66,7 @@ <h2 class="heading-medium">{{ _(headings[1].title) }}</h2>
</p>
</div>
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p>{{ _('10 million emails<br />25,000 text messages') }}</p>
<p>{{ _('20 million emails<br />100,000 text messages') }}</p>
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions app/translations/csv/fr.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1944,9 +1944,9 @@
"We apply limits to maintain our ","Nous appliquons des limites afin de maintenir nos "
"To discuss these limits, ","Si vous souhaitez en discuter avec nous, n’hésitez pas à "
"Daily limit per service:","Limite par jour et par service&nbsp;:"
"10,000 emails<br />1000 text messages","10 000 courriels<br />1 000 messages texte"
"10,000 emails<br />1,000 text messages","10 000 courriels<br />1 000 messages texte"
"<strong>Annual limit per service </strong>(April 1 to March 31)<strong>:</strong>","<strong>Limite par année et par service</strong> (du 1er avril au 31 mars)&nbsp;:"
"10 million emails<br />25,000 text messages","10 millions de courriels<br/>25 000 messages texte"
"20 million emails<br />100,000 text messages","20 millions de courriels<br/>100 000 messages texte"
"Texts are:","Les messages texte&nbsp;:"
"Unencrypted, and have other <a href='https://datatracker.ietf.org/doc/html/rfc5724#section-4'>security issues</a>. Bad actors may be able to impersonate your service.","ne sont pas chiffrés et présentent d’autres <a href='https://datatracker.ietf.org/doc/html/rfc5724#section-4'>problèmes en matière de sécurité</a> (disponible en anglais seulement). Des personnes mal intentionnées pourraient être en mesure d’usurper l’identité de votre service;"
"At higher risk than email for delay, delivery failure, or lack of information about delivery status.","présentent un risque plus élevé de retard, d’échec de livraison ou de manque d’information sur l’état de livraison que les courriels;"
Expand Down
4 changes: 2 additions & 2 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ def service_json(
message_limit=1000,
sms_daily_limit=1000,
rate_limit=100,
email_annual_limit=10000000,
sms_annual_limit=25000,
email_annual_limit=20000000,
sms_annual_limit=100000,
active=True,
restricted=True,
email_from="test.service",
Expand Down
26 changes: 13 additions & 13 deletions tests/app/main/views/test_service_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ def mock_get_service_settings_page_common(
"Email branding English Government of Canada signature Change",
"Send files by email Off (API-only) Change",
"Daily maximum 1,000 emails",
"Annual maximum(April 1 to March 31) 10,000,000 emails",
"Annual maximum(April 1 to March 31) 20,000,000 emails",
"Label Value Action",
"Send text messages On Change",
"Start text messages with service name On Change",
"Send international text messages Off Change",
"Daily maximum 1,000 text messages",
"Annual maximum(April 1 to March 31) 25,000 text messages",
"Annual maximum(April 1 to March 31) 100,000 text messages",
],
),
(
Expand All @@ -95,21 +95,21 @@ def mock_get_service_settings_page_common(
"Email branding English Government of Canada signature Change",
"Send files by email Off (API-only) Change",
"Daily maximum 1,000 emails",
"Annual maximum(April 1 to March 31) 10,000,000 emails",
"Annual maximum(April 1 to March 31) 20,000,000 emails",
"Label Value Action",
"Send text messages On Change",
"Start text messages with service name On Change",
"Send international text messages Off Change",
"Daily maximum 1,000 text messages",
"Annual maximum(April 1 to March 31) 25,000 text messages",
"Annual maximum(April 1 to March 31) 100,000 text messages",
"Label Value Action",
"Live On Change",
"Count in list of live services Yes Change",
"Organisation Test Organisation Government of Canada Change",
"Daily email limit 1,000 Change",
"Daily text message limit 1,000 Change",
"Annual email limit 10,000,000 Change",
"Annual text message limit 25,000 Change",
"Annual email limit 20,000,000 Change",
"Annual text message limit 100,000 Change",
"API rate limit per minute 100",
"Text message senders GOVUK Manage",
"Receive text messages Off Change",
Expand Down Expand Up @@ -233,13 +233,13 @@ def test_organisation_name_links_to_org_dashboard(
"Email branding Your branding (Organisation name) Change",
"Send files by email Off (API-only) Change",
"Daily maximum 1,000 emails",
"Annual maximum(April 1 to March 31) 10,000,000 emails",
"Annual maximum(April 1 to March 31) 20,000,000 emails",
"Label Value Action",
"Send text messages On Change",
"Start text messages with service name On Change",
"Send international text messages On Change",
"Daily maximum 1,000 text messages",
"Annual maximum(April 1 to March 31) 25,000 text messages",
"Annual maximum(April 1 to March 31) 100,000 text messages",
],
),
(
Expand All @@ -255,13 +255,13 @@ def test_organisation_name_links_to_org_dashboard(
"Email branding Your branding (Organisation name) Change",
"Send files by email Off (API-only) Change",
"Daily maximum 1,000 emails",
"Annual maximum(April 1 to March 31) 10,000,000 emails",
"Annual maximum(April 1 to March 31) 20,000,000 emails",
"Label Value Action",
"Send text messages On Change",
"Start text messages with service name On Change",
"Send international text messages Off Change",
"Daily maximum 1,000 text messages",
"Annual maximum(April 1 to March 31) 25,000 text messages",
"Annual maximum(April 1 to March 31) 100,000 text messages",
],
),
],
Expand Down Expand Up @@ -3235,7 +3235,7 @@ def test_unknown_channel_404s(
),
(
"sms",
"You can send up to 25,000 text messages per fiscal year.",
"You can send up to 100,000 text messages per fiscal year.",
"Send text messages",
[],
"False",
Expand All @@ -3244,7 +3244,7 @@ def test_unknown_channel_404s(
),
(
"email",
"You can send up to 10 million emails per fiscal year for free.",
"You can send up to 20 million emails per fiscal year for free.",
"Send emails",
[],
"False",
Expand All @@ -3253,7 +3253,7 @@ def test_unknown_channel_404s(
),
(
"email",
"You can send up to 10 million emails per fiscal year for free.",
"You can send up to 20 million emails per fiscal year for free.",
"Send emails",
["email", "sms", "letter"],
"True",
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3636,12 +3636,12 @@ def mock_update_message_limit(mocker):

@pytest.fixture(scope="function")
def mock_update_email_annual_limit(mocker):
return mocker.patch("app.service_api_client.update_email_annual_limit", return_value=10000000)
return mocker.patch("app.service_api_client.update_email_annual_limit", return_value=20000000)


@pytest.fixture(scope="function")
def mock_update_sms_annual_limit(mocker):
return mocker.patch("app.service_api_client.update_sms_annual_limit", return_value=25000)
return mocker.patch("app.service_api_client.update_sms_annual_limit", return_value=100000)


@pytest.fixture(scope="function")
Expand Down

0 comments on commit 4b4ac2b

Please sign in to comment.