Skip to content

Commit

Permalink
Rewrote a test assertion so that it doesn't fail under Python 2.7. Th…
Browse files Browse the repository at this point in the history
…anks to Florian Apolloner for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
freakboy3742 committed Oct 30, 2010
1 parent fffbbe4 commit 03b12ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/regressiontests/test_utils/python_25.py
Expand Up @@ -21,7 +21,7 @@ def test_failure(self):
with self.assertRaises(AssertionError) as exc_info: with self.assertRaises(AssertionError) as exc_info:
with self.assertNumQueries(2): with self.assertNumQueries(2):
Person.objects.count() Person.objects.count()
self.assertEqual(str(exc_info.exception), "1 != 2 : 1 queries executed, 2 expected") self.assertIn("1 queries executed, 2 expected", str(exc_info.exception))


with self.assertRaises(TypeError): with self.assertRaises(TypeError):
with self.assertNumQueries(4000): with self.assertNumQueries(4000):
Expand Down

0 comments on commit 03b12ae

Please sign in to comment.