From 41bf859b67fdde731a0aa6750b18d9961c217353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Tue, 2 Jun 2009 00:37:54 +0000 Subject: [PATCH] [soc2009/model-validation] Make GetUniqueCheckTests proper testCase since it doesn't need DB git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@10885 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/validation/tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/modeltests/validation/tests.py b/tests/modeltests/validation/tests.py index fd30628c19..f5944c3649 100644 --- a/tests/modeltests/validation/tests.py +++ b/tests/modeltests/validation/tests.py @@ -1,3 +1,5 @@ +import unittest + from django.core.exceptions import ValidationError, NON_FIELD_ERRORS from django.test import TestCase from django.db import models @@ -38,7 +40,7 @@ class BaseModelValidationTests(TestCase): mtv=ModelToValidate(number=10, name='Some Name', parent_id=parent.pk) self.assertEqual(None, mtv.clean()) -class GetUniqueCheckTests(TestCase): +class GetUniqueCheckTests(unittest.TestCase): def test_unique_fields_get_collected(self): m = UniqueFieldsModel() self.assertEqual(([('id',), ('unique_charfield',), ('unique_integerfield',)], []), m._get_unique_checks())