diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-05-04 14:16:48 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-05-04 14:16:48 +0100 |
commit | 56c3517328e32e64d2f0e16f3bbe811e53896a85 (patch) | |
tree | e0cf772ade888fcc3cf292c085a550d1b00cb51a /core | |
parent | 90bb0759a082755c55083f83bf029a44d225e013 (diff) | |
download | troggle-56c3517328e32e64d2f0e16f3bbe811e53896a85.tar.gz troggle-56c3517328e32e64d2f0e16f3bbe811e53896a85.tar.bz2 troggle-56c3517328e32e64d2f0e16f3bbe811e53896a85.zip |
fixed url ambiguity by rename
Diffstat (limited to 'core')
-rw-r--r-- | core/TESTS/tests.py | 10 | ||||
-rw-r--r-- | core/views/drawings.py | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/core/TESTS/tests.py b/core/TESTS/tests.py index b376840..b8340c2 100644 --- a/core/TESTS/tests.py +++ b/core/TESTS/tests.py @@ -400,6 +400,16 @@ class PageTests(TestCase): phmatch = re.search(ph, content) self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'") + def test_page_dwgallfiles_empty(self): + # this gets an empty page as the database has not been loaded + response = self.client.get('/dwgfiles/') + self.assertEqual(response.status_code, 200) + content = response.content.decode() + for ph in [ r'All Tunnel and Therion files', + r'<th>Scans folder</th><th>Scan files</th><th>Frames</th></tr>']: + phmatch = re.search(ph, content) + self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'") + def test_page_slash_empty(self): # tslash where there should not be one response = self.client.get('/expedition/1979/') diff --git a/core/views/drawings.py b/core/views/drawings.py index 19507b9..f0b684a 100644 --- a/core/views/drawings.py +++ b/core/views/drawings.py @@ -19,7 +19,7 @@ need to check if invalid query string is invalid, or produces multiple replies and render a user-friendly error page. ''' -def dwgdata(request): +def dwgallfiles(request): '''Report on all the drawing files in the system. These were loaded by parsing the entire directory tree ''' dwgfiles = DrawingFile.objects.all() |