Skip to content

Commit

Permalink
1.5 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
mtford90 committed Jun 10, 2014
1 parent 50fdd42 commit 7b895a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion django_silky/silk/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
from silk.tests.test_end_points import *
from silk.tests.test_config_auth import *
from silk.tests.test_config_max_body_size import *
from silk.tests.test_config_meta import *
from silk.tests.test_config_meta import *
from silk.tests.test_view_sql_detail import *
6 changes: 5 additions & 1 deletion django_silky/silk/tests/test_config_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ def test_authentication(self):
SilkyConfig().SILKY_AUTHENTICATION = True
response = self.client.get(reverse('silk:requests'))
self.assertEqual(response.status_code, 302)
self.assertIn(reverse('login'), response.url)
try:
url = response.url
except AttributeError: # Django 1.5
url = response['location']
self.assertIn(reverse('login'), url)


def test_default_authorisation(self):
Expand Down

0 comments on commit 7b895a0

Please sign in to comment.