mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-16 15:55:58 +02:00
Correct new lines
This commit is contained in:
parent
bdc03c66a9
commit
516415d806
4 changed files with 27 additions and 28 deletions
|
@ -128,4 +128,4 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
initComparativeColumnCharts();
|
initComparativeColumnCharts();
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -46,4 +46,4 @@ https://github.com/django/django/blob/main/django/contrib/admin/templates/admin/
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock fieldset_lines %}
|
{% endblock fieldset_lines %}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -734,7 +734,6 @@ def completed_domain_request(
|
||||||
"""A completed domain request."""
|
"""A completed domain request."""
|
||||||
if not user:
|
if not user:
|
||||||
user = get_user_model().objects.create(username="username" + str(uuid.uuid4())[:8])
|
user = get_user_model().objects.create(username="username" + str(uuid.uuid4())[:8])
|
||||||
|
|
||||||
ao, _ = Contact.objects.get_or_create(
|
ao, _ = Contact.objects.get_or_create(
|
||||||
first_name="Testy",
|
first_name="Testy",
|
||||||
last_name="Tester",
|
last_name="Tester",
|
||||||
|
|
|
@ -1194,31 +1194,6 @@ class TestDomainRequestAdmin(MockEppLib):
|
||||||
# Test that approved domain exists and equals requested domain
|
# Test that approved domain exists and equals requested domain
|
||||||
self.assertEqual(domain_request.requested_domain.name, domain_request.approved_domain.name)
|
self.assertEqual(domain_request.requested_domain.name, domain_request.approved_domain.name)
|
||||||
|
|
||||||
def assert_response_contains_distinct_values(self, response, expected_values):
|
|
||||||
"""
|
|
||||||
Asserts that each specified value appears exactly once in the response.
|
|
||||||
|
|
||||||
This method iterates over a list of tuples, where each tuple contains a field name
|
|
||||||
and its expected value. It then performs an assertContains check for each value,
|
|
||||||
ensuring that each value appears exactly once in the response.
|
|
||||||
|
|
||||||
Parameters:
|
|
||||||
- response: The HttpResponse object to inspect.
|
|
||||||
- expected_values: A list of tuples, where each tuple contains:
|
|
||||||
- field: The name of the field (used for subTest identification).
|
|
||||||
- value: The expected value to check for in the response.
|
|
||||||
|
|
||||||
Example usage:
|
|
||||||
expected_values = [
|
|
||||||
("title", "Treat inspector</td>"),
|
|
||||||
("email", "meoward.jones@igorville.gov</td>"),
|
|
||||||
]
|
|
||||||
self.assert_response_contains_distinct_values(response, expected_values)
|
|
||||||
"""
|
|
||||||
for field, value in expected_values:
|
|
||||||
with self.subTest(field=field, expected_value=value):
|
|
||||||
self.assertContains(response, value, count=1)
|
|
||||||
|
|
||||||
@less_console_noise_decorator
|
@less_console_noise_decorator
|
||||||
def test_other_contacts_has_readonly_link(self):
|
def test_other_contacts_has_readonly_link(self):
|
||||||
"""Tests if the readonly other_contacts field has links"""
|
"""Tests if the readonly other_contacts field has links"""
|
||||||
|
@ -1272,6 +1247,31 @@ class TestDomainRequestAdmin(MockEppLib):
|
||||||
expected_url = '<a href="city.com" class="padding-top-1 current-website__1">city.com</a>'
|
expected_url = '<a href="city.com" class="padding-top-1 current-website__1">city.com</a>'
|
||||||
self.assertContains(response, expected_url)
|
self.assertContains(response, expected_url)
|
||||||
|
|
||||||
|
def assert_response_contains_distinct_values(self, response, expected_values):
|
||||||
|
"""
|
||||||
|
Asserts that each specified value appears exactly once in the response.
|
||||||
|
|
||||||
|
This method iterates over a list of tuples, where each tuple contains a field name
|
||||||
|
and its expected value. It then performs an assertContains check for each value,
|
||||||
|
ensuring that each value appears exactly once in the response.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- response: The HttpResponse object to inspect.
|
||||||
|
- expected_values: A list of tuples, where each tuple contains:
|
||||||
|
- field: The name of the field (used for subTest identification).
|
||||||
|
- value: The expected value to check for in the response.
|
||||||
|
|
||||||
|
Example usage:
|
||||||
|
expected_values = [
|
||||||
|
("title", "Treat inspector</td>"),
|
||||||
|
("email", "meoward.jones@igorville.gov</td>"),
|
||||||
|
]
|
||||||
|
self.assert_response_contains_distinct_values(response, expected_values)
|
||||||
|
"""
|
||||||
|
for field, value in expected_values:
|
||||||
|
with self.subTest(field=field, expected_value=value):
|
||||||
|
self.assertContains(response, value, count=1)
|
||||||
|
|
||||||
@less_console_noise_decorator
|
@less_console_noise_decorator
|
||||||
def test_contact_fields_have_detail_table(self):
|
def test_contact_fields_have_detail_table(self):
|
||||||
"""Tests if the contact fields have the detail table which displays title, email, and phone"""
|
"""Tests if the contact fields have the detail table which displays title, email, and phone"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue