summaryrefslogtreecommitdiffstats
path: root/core/TESTS/tests.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2021-10-31 18:01:14 +0200
committerPhilip Sargent <philip.sargent@gmail.com>2021-10-31 18:01:14 +0200
commit252fcc4716f546169294dd740c92e79d81731c47 (patch)
treea90645b85aeadf67ee0d978a8f31e8e6e5aa88cd /core/TESTS/tests.py
parent36f92c5c9cf8efa65b5472c8b60768c4aa5e3d1e (diff)
downloadtroggle-252fcc4716f546169294dd740c92e79d81731c47.tar.gz
troggle-252fcc4716f546169294dd740c92e79d81731c47.tar.bz2
troggle-252fcc4716f546169294dd740c92e79d81731c47.zip
git install test and tidying
Diffstat (limited to 'core/TESTS/tests.py')
-rw-r--r--core/TESTS/tests.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/TESTS/tests.py b/core/TESTS/tests.py
index 7f254c8..eb2a429 100644
--- a/core/TESTS/tests.py
+++ b/core/TESTS/tests.py
@@ -114,7 +114,7 @@ class PageTests(TestCase):
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
def test_expoweb_notfound(self):
- response = self.client.get('/handbook/zyxxypqrqx.html')
+ response = self.client.get('/handbook/_test_zyxxypqrqx.html')
content = response.content.decode()
self.assertEqual(response.status_code, 404)
ph = r'<h1>Page not found'
@@ -123,7 +123,7 @@ class PageTests(TestCase):
def test_expoweb_no_dir(self):
# slash where there should not be one
- response = self.client.get('/handbook/zyxxypqrqx/')
+ response = self.client.get('/handbook/_test_zyxxypqrqx/')
self.assertEqual(response.status_code, 200)
content = response.content.decode()
ph = r"<h1>Directory not found"
@@ -357,7 +357,7 @@ class PageTests(TestCase):
def test_page_photos_ok(self):
# Flat file tests.
- response = self.client.get('/photos/2018/PhilipSargent/corin.jpg')
+ response = self.client.get('/photos/2018/PhilipSargent/corin.jpg') #exists
if response.status_code != 200:
self.assertEqual(response.status_code, 302)
if response.status_code != 302:
@@ -366,10 +366,10 @@ class PageTests(TestCase):
def test_page_photos_not_ok(self):
# Flat file tests.
- response = self.client.get('/photos/2018/PhilipSargent/corin.jpeg')
+ response = self.client.get('/photos/2018/PhilipSargent/_corin.jpeg') # does not exist
self.assertEqual(response.status_code, 404)
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 +"'")