mirror of
https://github.com/django/django.git
synced 2025-07-07 11:19:12 +00:00
[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
This commit is contained in:
parent
855423542c
commit
41bf859b67
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user