Example #1
0
 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
     })
Example #2
0
 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'
     })
Example #3
0
 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
     })
Example #4
0
 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'},
     )
Example #5
0
 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})
Example #6
0
 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})
Example #7
0
 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')
Example #8
0
 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')
Example #9
0
 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})