From 83bb5a3ae5ee8ecd428a80c013020f157d732d41 Mon Sep 17 00:00:00 2001 From: Harris Lapiroff Date: Wed, 25 Apr 2018 10:39:12 -0700 Subject: [PATCH 1/2] Add missing init files Missing these can cause problems in test autodiscovery --- home/__init__.py | 0 marketing/__init__.py | 0 marketing/tests/__init__.py | 0 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 home/__init__.py create mode 100644 marketing/__init__.py create mode 100644 marketing/tests/__init__.py diff --git a/home/__init__.py b/home/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/marketing/__init__.py b/marketing/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/marketing/tests/__init__.py b/marketing/tests/__init__.py new file mode 100644 index 000000000..e69de29bb From a47af27b0a82a808ce3602d475f73b040972a123 Mon Sep 17 00:00:00 2001 From: Harris Lapiroff Date: Wed, 25 Apr 2018 10:33:47 -0700 Subject: [PATCH 2/2] Fix search test that was already broken but wasn't running till this branch --- home/tests/test_search.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/home/tests/test_search.py b/home/tests/test_search.py index ce50e6376..25b9608eb 100644 --- a/home/tests/test_search.py +++ b/home/tests/test_search.py @@ -8,15 +8,15 @@ class TestHomepage(TestCase): def setUp(self): self.title = 'Awesome' self.description = 'Cool' - self.features_title = 'Features' - self.instances_title = 'Instances' + self.features_header = 'Features' + self.instances_header = 'Instances' self.home = HomePageFactory( title=self.title, description=json.dumps([ {'type': 'rich_text', 'value': self.description} ]), - features_title=self.features_title, - instances_title=self.instances_title, + features_header=self.features_header, + instances_header=self.instances_header, ) self.search_content = self.home.get_search_content() @@ -26,11 +26,8 @@ def test_get_search_content_indexes_title(self): def test_get_search_content_indexes_description(self): self.assertIn(self.description, self.search_content) - def test_get_search_content_index_blog_page_titles(self): - self.assertIn(self.blog_title, self.search_content) + def test_get_search_content_indexes_features_header(self): + self.assertIn(self.features_header, self.search_content) - def test_get_search_content_indexes_features_title(self): - self.assertIn(self.features_title, self.search_content) - - def test_get_search_content_indexes_instances_title(self): - self.assertIn(self.instances_title, self.search_content) + def test_get_search_content_indexes_instances_header(self): + self.assertIn(self.instances_header, self.search_content)