aboutsummaryrefslogtreecommitdiffstats
path: root/brevisurl/tests/backends/test_local.py
diff options
context:
space:
mode:
Diffstat (limited to 'brevisurl/tests/backends/test_local.py')
-rw-r--r--brevisurl/tests/backends/test_local.py10
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