mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
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:
parent
1070c57b83
commit
121d2e3678
106 changed files with 3841 additions and 1020 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue