def test_is_any_marketing_link_set(self): # test marketing site on with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): self.assertTrue(is_any_marketing_link_set(['ABOUT'])) self.assertTrue(is_any_marketing_link_set(['ABOUT', 'NOT_CONFIGURED'])) self.assertFalse(is_any_marketing_link_set(['NOT_CONFIGURED'])) # test marketing site off with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': False}): self.assertTrue(is_any_marketing_link_set(['ABOUT'])) self.assertTrue(is_any_marketing_link_set(['ABOUT', 'NOT_CONFIGURED'])) self.assertFalse(is_any_marketing_link_set(['NOT_CONFIGURED']))
def test_is_any_marketing_link_set(self): with override_settings(MKTG_URL_LINK_MAP={'ABOUT': self._get_test_url_name()}): # test marketing site on with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): self.assertTrue(is_any_marketing_link_set(['ABOUT'])) self.assertTrue(is_any_marketing_link_set(['ABOUT', 'NOT_CONFIGURED'])) self.assertFalse(is_any_marketing_link_set(['NOT_CONFIGURED'])) # test marketing site off with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': False}): self.assertTrue(is_any_marketing_link_set(['ABOUT'])) self.assertTrue(is_any_marketing_link_set(['ABOUT', 'NOT_CONFIGURED'])) self.assertFalse(is_any_marketing_link_set(['NOT_CONFIGURED']))
def test_is_any_marketing_link_set(self): # test marketing site on with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): self.assertTrue(is_any_marketing_link_set(['ABOUT'])) self.assertTrue( is_any_marketing_link_set(['ABOUT', 'NOT_CONFIGURED'])) self.assertFalse(is_any_marketing_link_set(['NOT_CONFIGURED'])) # test marketing site off with patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': False}): self.assertTrue(is_any_marketing_link_set(['ABOUT'])) self.assertTrue( is_any_marketing_link_set(['ABOUT', 'NOT_CONFIGURED'])) self.assertFalse(is_any_marketing_link_set(['NOT_CONFIGURED']))