Exemplo n.º 1
0
 def test_download_noindex(self):
     # Scene 1 of /firefox/new/ should never contain a noindex tag.
     req = RequestFactory().get('/firefox/new/')
     req.locale = 'en-US'
     response = views.new(req)
     doc = pq(response.content)
     robots = doc('meta[name="robots"]')
     assert robots.length == 0
Exemplo n.º 2
0
 def test_scene_2_noindex(self):
     # Scene 2 of /firefox/new/ should always contain a noindex tag.
     req = RequestFactory().get('/firefox/new/?scene=2')
     req.locale = 'en-US'
     response = views.new(req)
     doc = pq(response.content)
     robots = doc('meta[name="robots"]')
     eq_(robots.length, 1)
     ok_('noindex' in robots.attr('content'))
Exemplo n.º 3
0
 def test_onboarding_f_100_scene_1_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/?f=100')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/onboarding/scene1.html')
Exemplo n.º 4
0
 def test_download_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/trailhead/download.html', ANY)
Exemplo n.º 5
0
 def test_yandex_scene_1_switch_off(self, render_mock):
     req = RequestFactory().get('/firefox/new/')
     req.locale = 'ru'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/trailhead/download.html', ANY)
Exemplo n.º 6
0
 def test_better_browser_scene_1_vd(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=betterbrowser&v=d')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/better-browser/scene1.html', ANY)
Exemplo n.º 7
0
 def test_scene_2_default_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/?scene=2')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene2.html')
Exemplo n.º 8
0
 def test_portland_scene_1_safe_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=safe')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/portland/scene1-safe.html', ANY)
Exemplo n.º 9
0
 def test_variation_speed_nonde_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=geschwindigkeit')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html', ANY)
Exemplo n.º 10
0
 def test_variation_speed_nonde_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=geschwindigkeit')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html',
                                         ANY)
Exemplo n.º 11
0
 def test_variation_privacy_nonde_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=privatsphare')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html',
                                         ANY)
Exemplo n.º 12
0
 def test_compare_safari_scene_1va(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=safari&v=a')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html',
                                         ANY)
Exemplo n.º 13
0
 def test_variation_herz_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=herz')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(
         req, 'firefox/new/berlin/scene1-herz.html', ANY)
Exemplo n.º 14
0
 def test_scene_1_up_to_date_variant_locale(self, render_mock):
     # Non-en-US locales should get default template
     req = RequestFactory().get('/firefox/new/?v=c')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html')
Exemplo n.º 15
0
 def test_scene_1_up_to_date_variant_c(self, render_mock):
     req = RequestFactory().get('/firefox/new/?v=c')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/variant/scene1-vc.html')
Exemplo n.º 16
0
 def test_scene_1_up_to_date_variant_a(self, render_mock):
     # Double control group should get default template
     req = RequestFactory().get('/firefox/new/?v=a')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html')
Exemplo n.º 17
0
 def test_all_variation_invalid(self, render_mock):
     req = RequestFactory().get('/firefox/new/?v=3')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html', {'version': None})
Exemplo n.º 18
0
 def test_variation_oys_nonde_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=auf-deiner-seite')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html',
                                         ANY)
Exemplo n.º 19
0
 def test_wait_face_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=waitface')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/wait-face/scene1.html', ANY)
Exemplo n.º 20
0
 def test_berlin_video_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=aus-gruenden')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(
         req, 'firefox/new/berlin/scene1-aus-gruenden.html', ANY)
Exemplo n.º 21
0
 def test_berlin_nonde_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=berlin')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html', ANY)
Exemplo n.º 22
0
 def test_download_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(
         req, 'firefox/new/trailhead/download.html', ANY)
Exemplo n.º 23
0
 def test_variation_oys_nonde_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=auf-deiner-seite')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html', ANY)
Exemplo n.º 24
0
 def test_download_old_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html',
                                         ANY)
Exemplo n.º 25
0
 def test_compare_edge_scene_1_non_us(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=edge')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html', ANY)
Exemplo n.º 26
0
 def test_yandex_scene_1_switch_off(self, render_mock):
     req = RequestFactory().get('/firefox/new/')
     req.locale = 'ru'
     views.new(req)
     render_mock.assert_called_once_with(
         req, 'firefox/new/trailhead/download.html', ANY)
Exemplo n.º 27
0
 def test_scene_2_variant_b_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/?scene=2&v=b')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req,
         'firefox/new/variants/scene2/variant-b.html')
Exemplo n.º 28
0
 def test_wait_face_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=waitface')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(
         req, 'firefox/new/wait-face/scene1.html', ANY)
Exemplo n.º 29
0
 def test_thanks_redirect(self, render_mock):
     req = RequestFactory().get('/firefox/new/?scene=2&dude=abides')
     req.locale = 'en-US'
     resp = views.new(req)
     assert resp.status_code == 301
     assert resp['location'].endswith('/firefox/download/thanks/?scene=2&dude=abides')
Exemplo n.º 30
0
 def test_reggie_watts_untranslated_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=reggiewatts')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html',
                                         ANY)
Exemplo n.º 31
0
 def test_all_variation_invalid(self, render_mock):
     req = RequestFactory().get('/firefox/new/?v=3')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html',
                                         {'version': None})
Exemplo n.º 32
0
 def test_portland_scene_1_fast(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=portland-fast')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(
         req, 'firefox/new/portland/scene1-fast.html', ANY)
Exemplo n.º 33
0
 def test_onboarding_locale_scene_2_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/?scene=2&f=99')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene2.html')
Exemplo n.º 34
0
 def test_portland_nonenus_scene_1_safe(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=portland-safe')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html',
                                         ANY)
Exemplo n.º 35
0
 def test_de_b_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?v=b')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/de/scene1-b.html', ANY)
Exemplo n.º 36
0
 def test_berlin_nonde_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=berlin')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html',
                                         ANY)
Exemplo n.º 37
0
 def test_reggie_watts_untranslated_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=reggiewatts')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html', ANY)
Exemplo n.º 38
0
 def test_scene_2_default_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/?scene=2')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene2.html')
Exemplo n.º 39
0
 def test_portland_nonenus_scene_1_safe(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=portland-safe')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html', ANY)
Exemplo n.º 40
0
 def test_scene_1_variant_4a_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/?v=4a')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(
         req, 'firefox/new/variants/scene1/variant-4a.html')
Exemplo n.º 41
0
 def test_variation_herz_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=herz')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/berlin/scene1-herz.html', ANY)
Exemplo n.º 42
0
 def test_scene_2_variant_b_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/?scene=2&v=b')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(
         req, 'firefox/new/variants/scene2/variant-b.html')
Exemplo n.º 43
0
 def test_variation_privacy_nonde_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=privatsphare')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html', ANY)
Exemplo n.º 44
0
 def test_scene_2_variant_non_en_us_template(self, render_mock):
     """Non en-US locales should still see default template"""
     req = RequestFactory().get('/firefox/new/?scene=2&v=a')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene2.html')
Exemplo n.º 45
0
 def test_berlin_video_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=aus-gruenden')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/berlin/scene1-aus-gruenden.html', ANY)
Exemplo n.º 46
0
 def test_better_browser_scene_1_vd(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=betterbrowser&v=d')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(
         req, 'firefox/new/better-browser/scene1.html', ANY)
Exemplo n.º 47
0
 def test_compare_safari_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=safari')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/compare/scene1-safari.html', ANY)
Exemplo n.º 48
0
 def test_better_browser_scene_1_non_us(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=betterbrowser')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html',
                                         ANY)
Exemplo n.º 49
0
 def test_install_scene_1_c(self, render_mock):
     req = RequestFactory().get('/firefox/new/?v=c')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/install/scene1.html', ANY)
Exemplo n.º 50
0
 def test_compare_chrome_scene_1v2(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=chrome&v=2')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(
         req, 'firefox/new/compare/scene1-chrome-2.html', ANY)
Exemplo n.º 51
0
 def test_scene_1_variant_4a_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/?v=4a')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req,
         'firefox/new/variants/scene1/variant-4a.html')
Exemplo n.º 52
0
 def test_compare_chrome_scene_1_non_us(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=chrome')
     req.locale = 'fr'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html',
                                         ANY)
Exemplo n.º 53
0
 def test_scene_2_variant_non_en_us_template(self, render_mock):
     """Non en-US locales should still see default template"""
     req = RequestFactory().get('/firefox/new/?scene=2&v=a')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene2.html')
Exemplo n.º 54
0
 def test_compare_edge_scene_1v1(self, render_mock):
     req = RequestFactory().get('/firefox/new/?xv=edge&v=1')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(
         req, 'firefox/new/compare/scene1-edge-1.html', ANY)
Exemplo n.º 55
0
 def test_download_old_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene1.html', ANY)
Exemplo n.º 56
0
 def test_onboarding_f_100_scene_1_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/?f=100')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/onboarding/scene1.html')
Exemplo n.º 57
0
 def test_yandex_scene_1(self, render_mock):
     req = RequestFactory().get('/firefox/new/')
     req.locale = 'ru'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/yandex/scene1.html', ANY)
Exemplo n.º 58
0
 def test_way_of_the_fox_locale_scene_2(self, render_mock):
     req = RequestFactory().get('/firefox/new/?scene=2&xv=breakfree')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene2.html')
Exemplo n.º 59
0
 def test_batmresist_scene_2(self, render_mock):
     req = RequestFactory().get('/firefox/new/?scene=2&xv=batmresist')
     req.locale = 'en-US'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/batm/scene2.html')
Exemplo n.º 60
0
 def test_onboarding_locale_scene_2_template(self, render_mock):
     req = RequestFactory().get('/firefox/new/?scene=2&f=99')
     req.locale = 'de'
     views.new(req)
     render_mock.assert_called_once_with(req, 'firefox/new/scene2.html')