diff options
| author | Vladimir Gorej | 2012-09-17 15:04:01 +0200 |
|---|---|---|
| committer | Vladimir Gorej | 2012-09-17 15:04:01 +0200 |
| commit | e5091447bc204d730be7129be575516ab1acef91 (patch) | |
| tree | 2c3b36110b5f2f0c71f191647dde1bfdb2305fe1 /brevisurl/tests/backends/test_local.py | |
| parent | 5e37d36d5b8a241d458d54fa300ff3b7bfed8f5f (diff) | |
| download | django-brevisurl-e5091447bc204d730be7129be575516ab1acef91.tar.bz2 | |
Fixes for version 1.01.0
Diffstat (limited to 'brevisurl/tests/backends/test_local.py')
| -rw-r--r-- | brevisurl/tests/backends/test_local.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/brevisurl/tests/backends/test_local.py b/brevisurl/tests/backends/test_local.py index 437c790..4577376 100644 --- a/brevisurl/tests/backends/test_local.py +++ b/brevisurl/tests/backends/test_local.py @@ -119,19 +119,13 @@ class TestLocalBrevisUrlBackend(TestCase): brevisurl.settings.LOCAL_BACKEND_DOMAIN = _original_domain def test_url_path_slash_stripping(self): - _original_slash_strip = brevisurl.settings.LOCAL_BACKEND_STRIP_TOKEN_URL_SLASH original_url = 'http://www.codescale.net/' connection = get_connection('brevisurl.backends.local.BrevisUrlBackend', domain='http://test.com/d') - brevisurl.settings.LOCAL_BACKEND_STRIP_TOKEN_URL_SLASH = True short_url = connection.shorten_url(original_url) self.assertRegexpMatches(short_url.shortened_url, r'^http://test\.com/d[^/]{5}$') - brevisurl.settings.LOCAL_BACKEND_STRIP_TOKEN_URL_SLASH = _original_slash_strip def test_url_path_slash_no_stripping(self): - _original_slash_strip = brevisurl.settings.LOCAL_BACKEND_STRIP_TOKEN_URL_SLASH original_url = 'http://www.codescale.net/' - connection = get_connection('brevisurl.backends.local.BrevisUrlBackend', domain='http://test.com/d') - brevisurl.settings.LOCAL_BACKEND_STRIP_TOKEN_URL_SLASH = False + connection = get_connection('brevisurl.backends.local.BrevisUrlBackend', domain='http://test.com/d/') short_url = connection.shorten_url(original_url) - self.assertRegexpMatches(short_url.shortened_url, r'^http://test\.com/d/[^/]{5}$') - brevisurl.settings.LOCAL_BACKEND_STRIP_TOKEN_URL_SLASH = _original_slash_strip
\ No newline at end of file + self.assertRegexpMatches(short_url.shortened_url, r'^http://test\.com/d/[^/]{5}$')
\ No newline at end of file |
