Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
add winxp tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Brandt committed Dec 22, 2015
1 parent a571fc2 commit d0d46e0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/test_redirects.py
Expand Up @@ -12,6 +12,28 @@

class TestRedirects(Base):

@pytest.mark.parametrize(('product_alias'), [
'38.5.1esr', 'latest', '42.0', '43.0.1', '44.0', '44.0b1'
])
def test_ie6_winxp_useragent_string_redirects_to_correct_version(self, base_url, product_alias):
# With Bug 1233779, WinXP bouncer is configured to redirect users
# to Firefox version 43.0.1 if they visit firefox-latest and firefox-44.0
user_agent_ie6 = ('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)')

param = {
'product': 'firefox-' + product_alias,
'lang': 'en-US',
'os': 'win'
}

response = self._head_request(base_url, user_agent=user_agent_ie6, params=param)
parsed_url = urlparse(response.url)

if product_alias in ['latest', '44.0', '43.0.1']:
assert '43.0.1.exe' in parsed_url.path
else:
assert (product_alias + '.exe') in parsed_url.path

def test_that_checks_redirect_using_incorrect_query_values(self, base_url):
param = {
'product': 'firefox-31.0',
Expand Down

0 comments on commit d0d46e0

Please sign in to comment.