Skip to content

Commit

Permalink
Make the test compatible with Django 1.4 template error reporting.
Browse files Browse the repository at this point in the history
  • Loading branch information
nigma committed Mar 6, 2012
1 parent 98e13de commit fe063c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rulez/tests/templatetags.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def test_active_user_against_missing_permission(self):
self.assertEqual(rendered, "no he can't")

def test_invalid_user(self):
self.assertRaisesRegexp(TemplateSyntaxError,
"Caught AttributeError while rendering: 'NoneType' object has no attribute 'has_perm'",
self.assertRaisesRegexp((TemplateSyntaxError, AttributeError),
"'NoneType' object has no attribute 'has_perm'",
self.render_template,
"{% load rulez_perms %}{% rulez_perms mock_positive_permission object as can %}", {
"object": MockModel(), "user": None
Expand Down

0 comments on commit fe063c3

Please sign in to comment.