diff --git a/project/common/tests.py b/project/common/tests.py index b5732a0..5447e37 100644 --- a/project/common/tests.py +++ b/project/common/tests.py @@ -40,7 +40,7 @@ class BaseTestCase(WagtailPageTests): def parse_content(self, content): return BeautifulSoup(content, 'html.parser') - def get_page_title(self, response): + def get_html_title(self, response): return self.parse_content(response.content).title.string def create_initial_homepage(self): @@ -93,7 +93,7 @@ class PageTestCase(BaseTestCase): def test_page_title(self): response = self.client.get(self.page.url) self.assertEqual(response.status_code, 200) - title = self.get_page_title(response) + title = self.get_html_title(response) self.assertEqual(self.page.get_page_title(), title) self.assertEqual(self.page.get_page_title(), "Test :: {}".format(settings.WAGTAIL_SITE_NAME)) @@ -105,6 +105,6 @@ class PageTestCase(BaseTestCase): new_page = HomePage.objects.get(title='Test Child') response = self.client.get(new_page.url) self.assertEqual(response.status_code, 200) - title = self.get_page_title(response) + title = self.get_html_title(response) self.assertEqual(new_page.get_page_title(), title) self.assertEqual(new_page.get_page_title(), "Test Child :: Test :: {}".format(settings.WAGTAIL_SITE_NAME))