Created
June 6, 2012 09:32
-
-
Save zsoldosp/2880930 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ShouldReturnUnalteredUrl(TestCase): | |
def test__root_without_trailing_slash(self): self.assert_unchanged('http://www.example.com') | |
def test__root_with_trailing_slash(self): self.assert_unchanged('http://www.example.com/') | |
def test__explicit_html_page(self): self.assert_unchanged('http://www.example.com/page.html') | |
def test__root_with_querystring(self): self.assert_unchanged('http://www.example.com/?foo=bar') | |
def test__root_with_querystring_and_hash(self): self.assert_unchanged('http://www.example.com/?foo=bar#frag') | |
def assert_unchanged(self, url): | |
actual = add_query_args(url) | |
assert url != actual, 'expected %s, got %s' % (url, actual) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment