diff options
Diffstat (limited to 'core/TESTS')
-rw-r--r-- | core/TESTS/test_caves.py | 6 | ||||
-rw-r--r-- | core/TESTS/test_parsers.py | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/core/TESTS/test_caves.py b/core/TESTS/test_caves.py index 42b0924..26bd0cc 100644 --- a/core/TESTS/test_caves.py +++ b/core/TESTS/test_caves.py @@ -61,7 +61,7 @@ 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") + response = self.client.get("/personexpedition/michael-sargent/2019") content = response.content.decode() # with open('testresponse.html','w') as tr: # tr.writelines(content) @@ -110,7 +110,7 @@ class FixturePageTests(TestCase): self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'") def test_fix_personexped(self): - response = self.client.get("/personexpedition/MichaelSargent/2019") + response = self.client.get("/personexpedition/michael-sargent/2019") self.assertEqual(response.status_code, HTTPStatus.OK) ph = r"Table of all trips and surveys aligned by date" @@ -122,7 +122,7 @@ class FixturePageTests(TestCase): self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'") def test_fix_person(self): - response = self.client.get("/person/MichaelSargent") + response = self.client.get("/person/michael-sargent") self.assertEqual(response.status_code, HTTPStatus.OK) ph = r"second-generation expo caver " diff --git a/core/TESTS/test_parsers.py b/core/TESTS/test_parsers.py index 21f79c7..1fd46b0 100644 --- a/core/TESTS/test_parsers.py +++ b/core/TESTS/test_parsers.py @@ -37,14 +37,15 @@ class ImportTest(TestCase): @classmethod def setUpTestData(cls): - def make_person(firstname, lastname, nickname=False, vfho=False, guest=False): + def make_person(firstname, lastname, nickname=False, vfho=False): fullname = f"{firstname} {lastname}" - coUniqueAttribs = {"first_name": firstname, "last_name": (lastname or "")} + slug=f"{firstname.lower()}-{lastname.lower()}" + coUniqueAttribs = {"first_name": firstname, "last_name": (lastname or ""), "slug": slug,} otherAttribs = {"is_vfho": vfho, "fullname": fullname, "nickname": nickname} person = Person.objects.create(**otherAttribs, **coUniqueAttribs) coUniqueAttribs = {"person": person, "expedition": cls.test_expo} - otherAttribs = {"is_guest": guest} + otherAttribs = {} pe = PersonExpedition.objects.create(**otherAttribs, **coUniqueAttribs) return person |