Renamed a test model field added in [16345] so it doesn't keep the test DB ceation process from finishing under Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16499 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
332a485567
commit
6b31300057
|
@ -81,7 +81,8 @@ class FlexibleDatePost(models.Model):
|
||||||
|
|
||||||
class UniqueErrorsModel(models.Model):
|
class UniqueErrorsModel(models.Model):
|
||||||
name = models.CharField(max_length=100, unique=True, error_messages={'unique': u'Custom unique name message.'})
|
name = models.CharField(max_length=100, unique=True, error_messages={'unique': u'Custom unique name message.'})
|
||||||
number = models.IntegerField(unique=True, error_messages={'unique': u'Custom unique number message.'})
|
#number = models.IntegerField(unique=True, error_messages={'unique': u'Custom unique number message.'})
|
||||||
|
no = models.IntegerField(unique=True, error_messages={'unique': u'Custom unique number message.'})
|
||||||
|
|
||||||
class GenericIPAddressTestModel(models.Model):
|
class GenericIPAddressTestModel(models.Model):
|
||||||
generic_ip = models.GenericIPAddressField(blank=True, null=True, unique=True)
|
generic_ip = models.GenericIPAddressField(blank=True, null=True, unique=True)
|
||||||
|
|
|
@ -135,14 +135,14 @@ class PerformUniqueChecksTest(TestCase):
|
||||||
self.fail("unique_for_month checks shouldn't trigger when the associated DateField is None.")
|
self.fail("unique_for_month checks shouldn't trigger when the associated DateField is None.")
|
||||||
|
|
||||||
def test_unique_errors(self):
|
def test_unique_errors(self):
|
||||||
m1 = UniqueErrorsModel.objects.create(name='Some Name', number=10)
|
m1 = UniqueErrorsModel.objects.create(name='Some Name', no=10)
|
||||||
m = UniqueErrorsModel(name='Some Name', number=11)
|
m = UniqueErrorsModel(name='Some Name', no=11)
|
||||||
with self.assertRaises(ValidationError) as cm:
|
with self.assertRaises(ValidationError) as cm:
|
||||||
m.full_clean()
|
m.full_clean()
|
||||||
self.assertEqual(cm.exception.message_dict, {'name': [u'Custom unique name message.']})
|
self.assertEqual(cm.exception.message_dict, {'name': [u'Custom unique name message.']})
|
||||||
|
|
||||||
m = UniqueErrorsModel(name='Some Other Name', number=10)
|
m = UniqueErrorsModel(name='Some Other Name', no=10)
|
||||||
with self.assertRaises(ValidationError) as cm:
|
with self.assertRaises(ValidationError) as cm:
|
||||||
m.full_clean()
|
m.full_clean()
|
||||||
self.assertEqual(cm.exception.message_dict, {'number': [u'Custom unique number message.']})
|
self.assertEqual(cm.exception.message_dict, {'no': [u'Custom unique number message.']})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue