summaryrefslogtreecommitdiffstats
path: root/core/TESTS/test_caves.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-11-22 18:58:19 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2023-11-22 18:58:19 +0000
commit32e487eca6b12b70cf6ced3b662d815a9bcbb7cb (patch)
tree00c07f6930e6cede291c0b4859c5f5b2b09e0421 /core/TESTS/test_caves.py
parenta63f04d194709fae8022dda5ae2bdd9ac4e65be5 (diff)
downloadtroggle-32e487eca6b12b70cf6ced3b662d815a9bcbb7cb.tar.gz
troggle-32e487eca6b12b70cf6ced3b662d815a9bcbb7cb.tar.bz2
troggle-32e487eca6b12b70cf6ced3b662d815a9bcbb7cb.zip
still working on tests
Diffstat (limited to 'core/TESTS/test_caves.py')
-rw-r--r--core/TESTS/test_caves.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/core/TESTS/test_caves.py b/core/TESTS/test_caves.py
index 8390df5..d86104f 100644
--- a/core/TESTS/test_caves.py
+++ b/core/TESTS/test_caves.py
@@ -158,7 +158,12 @@ class FixturePageTests(TestCase):
"""Expect to get Page Not Found and status 404"""
ph = self.ph
ph = "Probably a mistake."
- response = self.client.get("/1623/115")
+ response = self.client.get("/1623/115/115")
+
+ # content = response.content.decode()
+ # with open('_test_bare_url115.html', 'w') as f:
+ # f.write(content)
+
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)
content = response.content.decode()
@@ -170,11 +175,11 @@ class FixturePageTests(TestCase):
ph = self.ph
ph = "Probably a mistake."
response = self.client.get("/1623-115")
- self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)
+ self.assertEqual(response.status_code, HTTPStatus.FOUND) # 302 redirected
content = response.content.decode()
phmatch = re.search(ph, content)
- self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'") # 200 & Page Not Found
+ self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'") # 302 & Page Not Found
def test_fix_caves284(self):
response = self.client.get("/caves")