def test_switch_on(self, render_mock): req = RequestFactory().get('/firefox/') views.firefox_home(req) render_mock.assert_called_once_with(req, 'firefox/home/index.html', { 'show_newsletter': True, 'variation': None })
def test_brand_locale_var_b(self, render_mock): req = RequestFactory().get('/firefox/?v=b') req.locale = 'fr' views.firefox_home(req) render_mock.assert_called_once_with(req, 'firefox/home/index.html', { 'show_newsletter': False, 'variation': 'b' })
def test_locale_no_newsletter(self, render_mock): req = RequestFactory().get('/firefox/') req.locale = 'it' views.firefox_home(req) render_mock.assert_called_once_with(req, 'firefox/home/index.html', { 'show_newsletter': False, 'variation': None })
def test_brand_var_b(self, render_mock): req = RequestFactory().get('/firefox/?v=b') req.locale = 'en-US' views.firefox_home(req) render_mock.assert_called_once_with( req, 'firefox/home/index-b.html', {'variation': 'b'}, )
def test_locale_no_newsletter(self, render_mock): req = RequestFactory().get('/firefox/') req.locale = 'it' views.firefox_home(req) render_mock.assert_called_once_with(req, 'firefox/home/index.html', {'show_newsletter': False})
def test_switch_on(self, render_mock): req = RequestFactory().get('/firefox/') views.firefox_home(req) render_mock.assert_called_once_with(req, 'firefox/home/index.html', {'show_newsletter': True})
def test_firefox_home_legacy(self, render_mock): req = RequestFactory().get('/firefox/') req.locale = 'fr' views.firefox_home(req) render_mock.assert_called_once_with(req, 'firefox/home/index-quantum.html')
def test_firefox_home(self, render_mock): req = RequestFactory().get('/firefox/') req.locale = 'en-US' views.firefox_home(req) render_mock.assert_called_once_with(req, 'firefox/home/index-master.html')
def test_locale_fr(self, render_mock): req = RequestFactory().get('/firefox/') req.locale = 'fr' views.firefox_home(req) render_mock.assert_called_once_with(req, 'firefox/home/index.html', {'show_newsletter': True})