2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-16 11:07:15 +00:00

chipping away bug in personexpedition, remove role

This commit is contained in:
Philip Sargent
2021-04-30 00:24:36 +01:00
parent e5cf1b5289
commit 03a5f5989e
9 changed files with 82 additions and 34 deletions

View File

@@ -58,6 +58,19 @@ class FixtureTests(TestCase):
self.assertIsNotNone(phmatch, "In fixture-loaded cave, failed to find expected text: '" + ph +"'")
def test_page_personexpedition(self):
response = self.client.get('/personexpedition/MichaelSargent/2019')
content = response.content.decode()
# with open('testresponse.html','w') as tr:
# tr.writelines(content)
self.assertEqual(response.status_code, 200)
for ph in [ r'Michael Sargent',
r'Table of all trips and surveys aligned by date' ]:
phmatch = re.search(ph, content)
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
# Need to add a fixture so that this actually has a logbook entry and a trip/svx in it.
class FixturePageTests(TestCase):
'''Currently nothing that runs troggle works - all do 404. Must be something in a template rendering crash?
ordinary pages are OK, and expopages and expofiles are OK, even though they come through troggle.