diff options
| author | Tom Christie | 2013-02-06 05:21:01 -0800 |
|---|---|---|
| committer | Tom Christie | 2013-02-06 05:21:01 -0800 |
| commit | 123c6cbc7cebf797ed0b310a5a8d398fa6323ce4 (patch) | |
| tree | 79d8108c64560cea6de4dad198ea7e28f64d682e /rest_framework/tests/urlpatterns.py | |
| parent | 55fd64663167ce4447565ecba7170f8eccc1fdf0 (diff) | |
| parent | 11610e7c3c4330b863c9da5d843b6d874c2958e9 (diff) | |
| download | django-rest-framework-123c6cbc7cebf797ed0b310a5a8d398fa6323ce4.tar.bz2 | |
Merge pull request #640 from mjtamlyn/remove-naked-excepts
Purge naked excepts.
Diffstat (limited to 'rest_framework/tests/urlpatterns.py')
| -rw-r--r-- | rest_framework/tests/urlpatterns.py | 4 |
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) |
