summaryrefslogtreecommitdiffstats
path: root/core/TESTS/tests.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2024-07-04 22:36:40 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2024-07-04 22:36:40 +0300
commit69ce1d91f3ef3ffc9baea5cbd926ff005fb20e97 (patch)
treefb1379ebc747fb22eb18139d689c2e2f4da4df15 /core/TESTS/tests.py
parent57bab53cec76f7cf84ae8ad4472073ff54e892b5 (diff)
downloadtroggle-69ce1d91f3ef3ffc9baea5cbd926ff005fb20e97.tar.gz
troggle-69ce1d91f3ef3ffc9baea5cbd926ff005fb20e97.tar.bz2
troggle-69ce1d91f3ef3ffc9baea5cbd926ff005fb20e97.zip
all tests working except for git troggle and survex parsing
Diffstat (limited to 'core/TESTS/tests.py')
-rw-r--r--core/TESTS/tests.py10
1 files changed, 6 insertions, 4 deletions
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"<title>Page not found 2018/PhilipSargent/_corin.jpeg</title>"
+ ph = r"<title>Page not found '2018/PhilipSargent/_corin.jpeg'</title>"
phmatch = re.search(ph, content)
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'")