diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2010-11-21 17:51:41 +0000 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2010-11-21 17:51:41 +0000 |
| commit | f5f18a38ab990910ca43448212c70938992c9787 (patch) | |
| tree | 5ede66b096f6b5aad6f80551591484aacc486cd9 /tests/regressiontests/test_utils/python_25.py | |
| parent | 73cd9b61c9142a72e19dae6c6bd97244eb7a8adc (diff) | |
Fixed #14749 -- added support for using Django's file object as context managers. Thanks to Florian Apolloner for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/test_utils/python_25.py')
| -rw-r--r-- | tests/regressiontests/test_utils/python_25.py | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/tests/regressiontests/test_utils/python_25.py b/tests/regressiontests/test_utils/python_25.py deleted file mode 100644 index 4adea6c080..0000000000 --- a/tests/regressiontests/test_utils/python_25.py +++ /dev/null @@ -1,28 +0,0 @@ -from __future__ import with_statement - -from django.test import TestCase - -from models import Person - - -class AssertNumQueriesTests(TestCase): - def test_simple(self): - with self.assertNumQueries(0): - pass - - with self.assertNumQueries(1): - Person.objects.count() - - with self.assertNumQueries(2): - Person.objects.count() - Person.objects.count() - - def test_failure(self): - with self.assertRaises(AssertionError) as exc_info: - with self.assertNumQueries(2): - Person.objects.count() - self.assertIn("1 queries executed, 2 expected", str(exc_info.exception)) - - with self.assertRaises(TypeError): - with self.assertNumQueries(4000): - raise TypeError |
