diff --git a/core/TESTS/tests.py b/core/TESTS/tests.py index 73fb052..085890c 100644 --- a/core/TESTS/tests.py +++ b/core/TESTS/tests.py @@ -85,8 +85,10 @@ class PageTests(TestCase): def test_expoweb_dir_no_index(self): response = self.client.get("/handbook/troggle") content = response.content.decode() + # with open('testresponse.html','w') as tr: + # tr.writelines(content) self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND) - ph = r"Page not found handbook/troggle/index.html" + ph = r"Page not found 'handbook/troggle/index.html'" phmatch = re.search(ph, content) self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'") @@ -170,7 +172,7 @@ class PageTests(TestCase): response = self.client.get("/1234/115.htm") self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND) content = response.content.decode() - ph = r"Page not found 1234/115.htm" + ph = r"Page not found '1234/115.htm'" phmatch = re.search(ph, content) self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'") @@ -190,7 +192,7 @@ class PageTests(TestCase): content = response.content.decode() ph = r"115" phmatch = re.search(ph, content) - self.assertIsNone(phmatch, "Failed to find expected text: '" + ph + "'") + self.assertIsNone(phmatch, "Unexpectedly found unexpected text: '" + ph + "'") def test_page_ss(self): response = self.client.get("/survey_scans/") @@ -406,7 +408,7 @@ class PageTests(TestCase): response = self.client.get("/photos/2018/PhilipSargent/_corin.jpeg") # does not exist self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND) content = response.content.decode() - ph = r"