Skip to content

Commit

Permalink
remove exception catch that is never used
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrDlouhy committed Aug 11, 2016
1 parent ae26d87 commit 339d234
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions django_admin_smoke_tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,10 @@ def test_change_view(self, model, model_admin):
request = self.get_request()

# make sure no errors happen here
try:
response = model_admin.change_view(request, object_id=str(pk))
if response.__class__ == django.template.response.TemplateResponse:
response.render()
self.assertEqual(response.status_code, 200)
except PermissionDenied:
# this error is commonly raised by ModelAdmins that don't allow
# adding.
pass
response = model_admin.change_view(request, object_id=str(pk))
if response.__class__ == django.template.response.TemplateResponse:
response.render()
self.assertEqual(response.status_code, 200)


class AdminSiteSmokeTest(AdminSiteSmokeTestMixin, TestCase):
Expand Down

0 comments on commit 339d234

Please sign in to comment.