diff options
Diffstat (limited to 'brevisurl/tests/test_models.py')
| -rw-r--r-- | brevisurl/tests/test_models.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/brevisurl/tests/test_models.py b/brevisurl/tests/test_models.py index 6942124..9a843f1 100644 --- a/brevisurl/tests/test_models.py +++ b/brevisurl/tests/test_models.py @@ -2,6 +2,7 @@ from django.core.exceptions import ValidationError from django.test import TestCase from django.contrib.sites.models import Site +import brevisurl.settings from brevisurl.models import ShortUrl from brevisurl import get_connection @@ -13,7 +14,8 @@ class TestModels(TestCase): connection = get_connection('brevisurl.backends.local.BrevisUrlBackend') short_url = ShortUrl() short_url.original_url = 'http://www.codescale.net/' - short_url.shortened_url = '{0}://{1}/12345'.format(connection.PROTOCOL, site.domain) + short_url.shortened_url = '{0}://{1}/12345'.format(brevisurl.settings.LOCAL_BACKEND_DOMAIN_PROTOCOL, + site.domain) short_url.backend = connection.class_path short_url.save() self.assertIsNotNone(short_url.pk) @@ -24,7 +26,8 @@ class TestModels(TestCase): self.connection = get_connection('brevisurl.backends.local.BrevisUrlBackend') self.short_url = ShortUrl() self.short_url.original_url = 'www.codescale.' - self.short_url.shortened_url = '{0}://{1}/12345'.format(self.connection.PROTOCOL, self.site.domain) + self.short_url.shortened_url = '{0}://{1}/12345'.format(brevisurl.settings.LOCAL_BACKEND_DOMAIN_PROTOCOL, + self.site.domain) self.short_url.backend = self.connection.class_path self.short_url.save() |
