2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 08:41:51 +00:00

fix tests

This commit is contained in:
Philip Sargent 2023-11-22 18:14:00 +00:00
parent 80c19864ad
commit a63f04d194

View File

@ -168,7 +168,7 @@ class PageTests(TestCase):
response = self.client.get("/1623/115.htm")
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)
content = response.content.decode()
ph = r"Page not found 1623/115.htm"
ph = r"Page not found 1623//115/115.htm"
phmatch = re.search(ph, content)
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'")
@ -515,12 +515,12 @@ class PageTests(TestCase):
phmatch = re.search(ph, content)
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'")
def test_eastings(self):
def test_stations(self):
# Needs another test with test data
response = self.client.get("/stations")
self.assertEqual(response.status_code, HTTPStatus.OK)
content = response.content.decode()
ph = r"<tr><th>Survex Station</th><th>x</th><th>y</th>"
ph = "<tr><th>Survex Station</th><th>x "
phmatch = re.search(ph, content)
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'")