コード例 #1
0
ファイル: test_views.py プロジェクト: madhur73/bedrock
 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
     })
コード例 #2
0
ファイル: test_views.py プロジェクト: madhur73/bedrock
 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'
     })
コード例 #3
0
ファイル: test_views.py プロジェクト: madhur73/bedrock
 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
     })
コード例 #4
0
ファイル: test_views.py プロジェクト: skrelnick23/bedrock
 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'},
     )
コード例 #5
0
ファイル: test_views.py プロジェクト: alexgibson/bedrock
 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})
コード例 #6
0
ファイル: test_views.py プロジェクト: alexgibson/bedrock
 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})
コード例 #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')
コード例 #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')
コード例 #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})