Permalink
Browse files

Merge pull request #30 from brandonsavage/master

Bouncer tests for redirect
  • Loading branch information...
2 parents e505f0c + 85eb5bb commit 5c8bf161e45250e99aeadc8fc170f61e2786d4fe @retornam retornam committed Apr 10, 2013
Showing with 22 additions and 1 deletion.
  1. +7 −1 README.md
  2. +15 −0 tests/test_redirects.py
View
@@ -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
@@ -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))

0 comments on commit 5c8bf16

Please sign in to comment.