Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bouncer tests for redirect #30

Merged
merged 1 commit into from

2 participants

@brandonsavage

No description provided.

@retornam
Collaborator

@brandonsavage are the redirects on staging yet? I'll merge if they are

@brandonsavage
@retornam retornam merged commit 5c8bf16 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 22 additions and 1 deletion.
  1. +7 −1 README.md
  2. +15 −0 tests/test_redirects.py
View
8 README.md
@@ -1,4 +1,10 @@
bouncer-tests
=============
-Tests for Mozilla's Bouncer
+Tests for Mozilla's Bouncer
+
+To run these tests, use:
+
+py.test tests/test_redirects.py --baseurl="http://your.url.com"
+
+Use -k to run a specific test.
View
15 tests/test_redirects.py
@@ -126,3 +126,18 @@ def test_redirect_for_firefox_aliases(self, testsetup, product_alias):
):
Assert.contains('/%s/' % 'win32', parsed_url.path,
'\n %s' % self.response_info(response))
+
+ def test_redirect_for_windows_200_to_2001(self, testsetup):
+
+ url = testsetup.base_url
+ param = {
+ 'product' : 'firefox-20.0',
+ 'os': 'win',
+ 'lang' : 'en-US',
+ }
+
+ response = self._head_request(url, params=param)
+
+ parsed_url = urlparse(response.url)
+
+ Assert.true('20.0.1' in parsed_url.query, 'Redirect failed using params of %s' % (parsed_url.query))
Something went wrong with that request. Please try again.