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"Page not found 2018/PhilipSargent/_corin.jpeg" + ph = r"Page not found '2018/PhilipSargent/_corin.jpeg'" phmatch = re.search(ph, content) self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'") diff --git a/core/fixtures/auth_users.json b/core/fixtures/auth_users.json deleted file mode 100644 index 7345de8..0000000 --- a/core/fixtures/auth_users.json +++ /dev/null @@ -1,8 +0,0 @@ -[ -{"pk": 9010, "model": "auth.user", "fields": - {"username": "expotest", "first_name": "ExpoTest", "last_name": "Caver", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2021-02-01 00:00:00+0100", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+expo@gmail.com", "date_joined": "2021-02-01 00:00:00+0100"}}, - -{"pk": 9011, "model": "auth.user", "fields": - {"username": "expotestadmin", "first_name": "ExpoTest", "last_name": "Admin", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": "2021-02-01 00:00:00+0100", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+expoadmin@gmail.com", "date_joined": "2021-02-01 00:00:00+0100"}} -] - \ No newline at end of file