Remove V2 of the EdX.org footer

This commit is contained in:
Will Daly
2015-06-10 12:01:14 -04:00
parent 2e9759ee43
commit 1cc776ff19
9 changed files with 3 additions and 393 deletions

View File

@@ -29,13 +29,6 @@ log = logging.getLogger("edx.footer")
def is_enabled():
"""Check whether the branding API is enabled. """
# TODO (ECOM-1339): Remove this comment
# Currently, the branding API configuration controls two things:
# 1) whether we're using the new version of the footer
# 2) whether we're exposing footer information through the API.
#
# Once we've enabled the new footer, the feature flag will control
# only (2), but not (1).
return BrandingApiConfig.current().enabled

View File

@@ -1,10 +0,0 @@
"""Context processors for Django templates. """
from branding import api as branding_api
# TODO (ECOM-1339): Remove this module once we permanently enable the V3 footer.
def branding_context_processor(request): # pylint: disable=unused-argument
"""Add the feature flag to Django template context. """
return {
"ENABLE_BRANDING_API": branding_api.is_enabled()
}

View File

@@ -43,10 +43,7 @@ class TestFooter(TestCase):
with patch.dict('django.conf.settings.FEATURES', {"IS_EDX_DOMAIN": True}):
resp = self.client.get('/')
self.assertEqual(resp.status_code, 200)
# assert that footer template has been properly overridden on homepage
# test the top-level element class; which is less likely to change than copy.
self.assertContains(resp, 'edx-footer')
self.assertContains(resp, 'footer-edx-v3')
def test_openedx_footer(self):
"""
@@ -56,10 +53,7 @@ class TestFooter(TestCase):
with patch.dict('django.conf.settings.FEATURES', {"IS_EDX_DOMAIN": False}):
resp = self.client.get('/')
self.assertEqual(resp.status_code, 200)
# assert that footer template has been properly overridden on homepage
# test the top-level element class; which is less likely to change than copy.
self.assertContains(resp, 'wrapper-footer')
self.assertContains(resp, 'footer-openedx')
@patch.dict(settings.FEATURES, {'IS_EDX_DOMAIN': True})
@override_settings(