mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #5416 -- Added TestCase.assertNumQueries, which tests that a given function executes the correct number of queries.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
ceef628c19
commit
5506653b77
13 changed files with 253 additions and 181 deletions
|
@ -6,7 +6,8 @@ from modeltests.validation.models import Author, Article, ModelToValidate
|
|||
|
||||
# Import other tests for this package.
|
||||
from modeltests.validation.validators import TestModelsWithValidators
|
||||
from modeltests.validation.test_unique import GetUniqueCheckTests, PerformUniqueChecksTest
|
||||
from modeltests.validation.test_unique import (GetUniqueCheckTests,
|
||||
PerformUniqueChecksTest)
|
||||
from modeltests.validation.test_custom_messages import CustomMessagesTest
|
||||
|
||||
|
||||
|
@ -111,4 +112,3 @@ class ModelFormsTests(TestCase):
|
|||
article = Article(author_id=self.author.id)
|
||||
form = ArticleForm(data, instance=article)
|
||||
self.assertEqual(form.errors.keys(), ['pub_date'])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue