1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Corrected a suite of test failures when running under postgres.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor
2010-10-17 01:49:36 +00:00
parent d931f43b70
commit cd63ce077d
3 changed files with 8 additions and 10 deletions

View File

@@ -11,13 +11,11 @@ class AssertNumQueriesTests(TestCase):
pass
with self.assertNumQueries(1):
# Guy who wrote Linux
Person.objects.create(name="Linus Torvalds")
Person.objects.count()
with self.assertNumQueries(2):
# Guy who owns the bagel place I like
Person.objects.create(name="Uncle Ricky")
self.assertEqual(Person.objects.count(), 2)
Person.objects.count()
Person.objects.count()
def test_failure(self):
with self.assertRaises(AssertionError) as exc_info: