aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests/urlpatterns.py
diff options
context:
space:
mode:
authorMarc Tamlyn2013-02-06 13:05:17 +0000
committerMarc Tamlyn2013-02-06 13:05:17 +0000
commitbd7977eed79bd8fc4d9e73b6d848b0f0cd5a72ec (patch)
tree4dc46974f2e1b6e957e611d820329d82efe2eae9 /rest_framework/tests/urlpatterns.py
parentcc2ec2bbf0aee53d360a81cf338361feca1e8f80 (diff)
downloaddjango-rest-framework-bd7977eed79bd8fc4d9e73b6d848b0f0cd5a72ec.tar.bz2
Purge naked excepts.
Most of these had obvious exceptions which would be thrown. Some I'm not sure about but they should at least catch only Exception so as not to ignore SystemExit and other inappropriate Error classes.
Diffstat (limited to 'rest_framework/tests/urlpatterns.py')
-rw-r--r--rest_framework/tests/urlpatterns.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/tests/urlpatterns.py b/rest_framework/tests/urlpatterns.py
index 41245ad1..82cd6cdb 100644
--- a/rest_framework/tests/urlpatterns.py
+++ b/rest_framework/tests/urlpatterns.py
@@ -23,14 +23,14 @@ class FormatSuffixTests(TestCase):
factory = RequestFactory()
try:
urlpatterns = format_suffix_patterns(urlpatterns)
- except:
+ except Exception:
self.fail("Failed to apply `format_suffix_patterns` on the supplied urlpatterns")
resolver = urlresolvers.RegexURLResolver(r'^/', urlpatterns)
for test_path in test_paths:
request = factory.get(test_path.path)
try:
callback, callback_args, callback_kwargs = resolver.resolve(request.path_info)
- except:
+ except Exception:
self.fail("Failed to resolve URL: %s" % request.path_info)
self.assertEquals(callback_args, test_path.args)
self.assertEquals(callback_kwargs, test_path.kwargs)