2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-15 09:37:10 +00:00

repairing tests

This commit is contained in:
2023-11-23 11:19:05 +00:00
parent 32e487eca6
commit 857b4c5809
2 changed files with 10 additions and 5 deletions

View File

@@ -165,10 +165,12 @@ class PageTests(TestCase):
def test_cave_kataster_not_found(self):
# database not loaded, so no caves found; so looks for a generic expopage and fails
response = self.client.get("/1623/115.htm")
# NEEDS TO BE REDONE AFETR cave id rewriting removed after the data is fixed in all teh cave description
# pages that link to photos
response = self.client.get("/1234/115.htm")
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)
content = response.content.decode()
ph = r"Page not found 1623//115/115.htm"
ph = r"Page not found 1234/115.htm"
phmatch = re.search(ph, content)
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'")