Skip to content

Commit

Permalink
Merge pull request #51 from PetrDlouhy/master
Browse files Browse the repository at this point in the history
Fix test setup for Django 1.9.
  • Loading branch information
ted kaemming committed Dec 17, 2015
2 parents d4213fa + 3306279 commit 3677f54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion subdomains/tests/tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import mock
import warnings

from django.contrib.sites.models import Site
from django.core.urlresolvers import NoReverseMatch, set_urlconf
from django.template import Context, Template
from django.test import TestCase
Expand All @@ -24,6 +23,7 @@ class SubdomainTestMixin(object):

def setUp(self):
super(SubdomainTestMixin, self).setUp()
from django.contrib.sites.models import Site
self.site = Site.objects.get_current()
self.site.domain = self.DOMAIN
self.site.save()
Expand Down
2 changes: 1 addition & 1 deletion subdomains/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
from urllib.parse import urlunparse

from django.conf import settings
from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse as simple_reverse


def current_site_domain():
from django.contrib.sites.models import Site
domain = Site.objects.get_current().domain

prefix = 'www.'
Expand Down

0 comments on commit 3677f54

Please sign in to comment.