Merge pull request #11494 from edx/saleem-latif/WL-307
WL-307: correct FAVICON_PATH setting for comprehensive theming
This commit is contained in:
@@ -71,3 +71,18 @@ class TestComprehensiveTheming(TestCase):
|
||||
def test_overridden_logo_image(self):
|
||||
result = staticfiles.finders.find('images/logo.png')
|
||||
self.assertEqual(result, settings.REPO_ROOT / 'themes/red-theme/lms/static/images/logo.png')
|
||||
|
||||
def test_default_favicon(self):
|
||||
"""
|
||||
Test default favicon is served if no theme is applied
|
||||
"""
|
||||
result = staticfiles.finders.find('images/favicon.ico')
|
||||
self.assertEqual(result, settings.REPO_ROOT / 'lms/static/images/favicon.ico')
|
||||
|
||||
@with_comprehensive_theme(settings.REPO_ROOT / 'themes/red-theme')
|
||||
def test_overridden_favicon(self):
|
||||
"""
|
||||
Test comprehensive theme override on favicon image.
|
||||
"""
|
||||
result = staticfiles.finders.find('images/favicon.ico')
|
||||
self.assertEqual(result, settings.REPO_ROOT / 'themes/red-theme/lms/static/images/favicon.ico')
|
||||
|
||||
@@ -45,10 +45,6 @@ def comprehensive_theme_changes(theme_dir):
|
||||
if locale_dir.isdir():
|
||||
changes['settings']['LOCALE_PATHS'] = [locale_dir] + settings.LOCALE_PATHS
|
||||
|
||||
favicon = component_dir / "static" / "images" / "favicon.ico"
|
||||
if favicon.isfile():
|
||||
changes['settings']['FAVICON_PATH'] = str(favicon)
|
||||
|
||||
return changes
|
||||
|
||||
|
||||
|
||||
BIN
themes/red-theme/lms/static/images/favicon.ico
Normal file
BIN
themes/red-theme/lms/static/images/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Reference in New Issue
Block a user