2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-21 23:01:52 +00:00

test checked

This commit is contained in:
Philip Sargent 2023-04-05 12:46:10 +01:00
parent 4d8cb82ef9
commit 0a76acd664

View File

@ -103,12 +103,12 @@ class ImportTest(TestCase):
self.assertNotIn(e, messages)
def test_aliases(self):
# Needs another test with test data
# Problem: '' empty string appears as valid alias for David Smartarse
response = self.client.get(f"/aliases/{TEST_YEAR}")
self.assertEqual(response.status_code, HTTPStatus.OK)
content = response.content.decode()
with open('_test_response.html', 'w') as f:
f.write(content)
# with open('_test_response.html', 'w') as f:
# f.write(content)
ph = f"'fsmartarse'"
phmatch = re.search(ph, content)
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'")