diff options
| author | Tom Christie | 2011-04-25 01:03:23 +0100 |
|---|---|---|
| committer | Tom Christie | 2011-04-25 01:03:23 +0100 |
| commit | 4692374e0d6f020f8a7a95f3a60094d525c59341 (patch) | |
| tree | 016dec93ce950027e2ee6f4a6b8c0e1d5ecf2037 /djangorestframework/tests/reverse.py | |
| parent | cb4b4f6be6eeac3d2383614998a5e1436cb4226e (diff) | |
| download | django-rest-framework-4692374e0d6f020f8a7a95f3a60094d525c59341.tar.bz2 | |
Generic permissions added, allowed_methods and anon_allowed_methods now defunct, dispatch now mirrors View.dispatch more nicely
Diffstat (limited to 'djangorestframework/tests/reverse.py')
| -rw-r--r-- | djangorestframework/tests/reverse.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/djangorestframework/tests/reverse.py b/djangorestframework/tests/reverse.py index f6a3ea51..1f9071b3 100644 --- a/djangorestframework/tests/reverse.py +++ b/djangorestframework/tests/reverse.py @@ -12,7 +12,7 @@ except ImportError: class MockResource(Resource): """Mock resource which simply returns a URL, so that we can ensure that reversed URLs are fully qualified""" - anon_allowed_methods = ('GET',) + permissions = () def get(self, request): return reverse('another') @@ -28,5 +28,9 @@ class ReverseTests(TestCase): urls = 'djangorestframework.tests.reverse' def test_reversed_urls_are_fully_qualified(self): - response = self.client.get('/') + try: + response = self.client.get('/') + except: + import traceback + traceback.print_exc() self.assertEqual(json.loads(response.content), 'http://testserver/another') |
