Commit 85f5708d by Sarina Canelake

Merge pull request #8388 from edx/sarina/allow-preview-of-launched-langs

Allow released languages to be previewed under dark lang
parents 7c2a4bc7 780ec6ee
......@@ -126,7 +126,4 @@ class DarkLangMiddleware(object):
if not preview_lang:
return
if preview_lang in self.released_langs:
return
request.session['django_language'] = preview_lang
......@@ -155,13 +155,14 @@ class DarkLangMiddlewareTests(TestCase):
)
def test_preview_lang_with_released_language(self):
# Preview lang should always override selection.
self.assertSessionLangEquals(
UNSET,
'rel',
self.process_request(preview_lang='rel')
)
self.assertSessionLangEquals(
'notrel',
'rel',
self.process_request(preview_lang='rel', django_language='notrel')
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment