2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-16 05:57:09 +00:00

JSLIB and tidy path settings

This commit is contained in:
Philip Sargent
2021-04-02 19:22:53 +01:00
parent 371542fb1e
commit 663d4a2a02
5 changed files with 43 additions and 26 deletions

View File

@@ -314,7 +314,19 @@ class PageTests(TestCase):
self.assertEqual(response.status_code, 302)
if response.status_code != 302:
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.content), 39482 )
self.assertEqual(len(response.content), 39482 ) # need to check it is not just an error page
def test_page_site_media_css(self):
# Flat file tests.
response = self.client.get('/site_media/css/main3.css')
if response.status_code != 200:
self.assertEqual(response.status_code, 302)
if response.status_code != 302:
self.assertEqual(response.status_code, 200)
content = response.content.decode() # need to check it is not just an error page
ph = r'This text is used by the test system to determine that main3.css loaded correctly'
phmatch = re.search(ph, content)
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
def test_page_photos_ok(self):
# Flat file tests.
@@ -323,7 +335,7 @@ class PageTests(TestCase):
self.assertEqual(response.status_code, 302)
if response.status_code != 302:
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.content), 67487 )
self.assertEqual(len(response.content), 67487 ) # need to check it is not just an error page
def test_page_photos_not_ok(self):
# Flat file tests.

View File

@@ -24,6 +24,7 @@ def pathsreport(request):
pathsdict = {
# "BOGUS" : str( settings.BOGUS),
"JSLIB_URL" : str( settings.JSLIB_URL),
"JSLIB_ROOT" : str( settings.JSLIB_ROOT),
# "CSSLIB_URL" : str( settings.CSSLIB_URL),
"CAVEDESCRIPTIONS" : str( settings.CAVEDESCRIPTIONS),
"DIR_ROOT" : str( settings.DIR_ROOT),
@@ -60,6 +61,7 @@ def pathsreport(request):
pathstype = {
# "BOGUS" : type(settings.BOGUS),
"JSLIB_URL" : type(settings.JSLIB_URL),
"JSLIB_ROOT" : str( settings.JSLIB_ROOT),
# "CSSLIB_URL" : type(settings.CSSLIB_URL),
"CAVEDESCRIPTIONS" : type(settings.CAVEDESCRIPTIONS),
"DIR_ROOT" : type(settings.DIR_ROOT),