Fixed test

This commit is contained in:
alexjanousekGSA
2025-01-13 15:17:02 -05:00
parent 0982e70a54
commit 66dfca579a
5 changed files with 6 additions and 17 deletions

View File

@@ -555,7 +555,7 @@
"filename": "tests/app/main/views/test_register.py",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 201,
"line_number": 200,
"is_secret": false
},
{
@@ -563,7 +563,7 @@
"filename": "tests/app/main/views/test_register.py",
"hashed_secret": "bb5b7caa27d005d38039e3797c3ddb9bcd22c3c8",
"is_verified": false,
"line_number": 274,
"line_number": 273,
"is_secret": false
}
],
@@ -684,5 +684,5 @@
}
]
},
"generated_at": "2025-01-12T22:42:11Z"
"generated_at": "2025-01-13T20:16:58Z"
}

View File

@@ -35,20 +35,13 @@ class CsvFileValidator:
)
)
class ValidGovEmail:
def __call__(self, form, field):
if field.data == "":
return
from flask import url_for
message = "Enter a public sector email address."
message = """
Enter a public sector email address or
<a class="usa-link" href="{}">find out who can use Notify</a>
""".format(
url_for("main.features")
)
if not is_gov_user(field.data.lower()):
raise ValidationError(message)

View File

@@ -11,10 +11,8 @@
<h1 class="font-body-2xl">Features</h1>
<p class="usa-body">If you work for the government, you can use Notify.gov to keep your users updated.</p>
<p class="usa-body">Notify makes it easy to create, customize, and send <a class="usa-link" href="{{ url_for('main.features_sms') }}">text messages</a>.</p>
<!-- <ul class="list list-bullet">
<li><a class="usa-link" href="{{ url_for('main.features_sms') }}">text messages</a></li>
</ul> -->
<p class="usa-body">Notify makes it easy to create, customize, and send text messages</a>.</p>
<p class="usa-body">You do not need any technical knowledge to use Notify.</p>
{% if not current_user.is_authenticated %}
<p class="usa-body"><a class="usa-link" href="{{ url_for('main.register') }}">Create an account</a> for free and try it yourself.</p>

View File

@@ -21,7 +21,6 @@
<ul class="list list-bullet">
<li><a class="usa-link" href="{{ url_for('main.trial_mode_new') }}">trial mode</a></li>
<li><a class="usa-link" href="{{ url_for('main.message_status') }}">message status types</a></li>
<li><a class="usa-link" href="{{ url_for('main.features_sms') }}">text message replies</a></li>
</ul>
</div>

View File

@@ -148,7 +148,6 @@ def test_should_return_200_when_email_is_not_gov_uk(
"Enter a public sector email address or find out who can use Notify"
in normalize_spaces(page.select_one(".usa-error-message").text)
)
assert page.select_one(".usa-error-message a")["href"] == url_for("main.features")
@pytest.mark.parametrize(