Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2010-10-11 12:55:17 +00:00
parent 1070c57b83
commit 121d2e3678
106 changed files with 3841 additions and 1020 deletions

View file

@ -1,12 +1,12 @@
from unittest import TestCase
from django.db import DatabaseError
from django.utils import unittest
from regressiontests.max_lengths.models import PersonWithDefaultMaxLengths, PersonWithCustomMaxLengths
class MaxLengthArgumentsTests(TestCase):
class MaxLengthArgumentsTests(unittest.TestCase):
def verify_max_length(self, model,field,length):
self.assertEquals(model._meta.get_field(field).max_length,length)
def test_default_max_lengths(self):
self.verify_max_length(PersonWithDefaultMaxLengths, 'email', 75)
self.verify_max_length(PersonWithDefaultMaxLengths, 'vcard', 100)
@ -19,7 +19,7 @@ class MaxLengthArgumentsTests(TestCase):
self.verify_max_length(PersonWithCustomMaxLengths, 'homepage', 250)
self.verify_max_length(PersonWithCustomMaxLengths, 'avatar', 250)
class MaxLengthORMTests(TestCase):
class MaxLengthORMTests(unittest.TestCase):
def test_custom_max_lengths(self):
args = {