mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +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:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user