Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Renamed a test model field added in [16345] so it doesn't keep the te…

…st DB ceation process from finishing under Oracle.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16499 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 6b31300057a3c2239dceab0b9f51e5e31132265b 1 parent 332a485
@ramiro ramiro authored
View
3  tests/modeltests/validation/models.py
@@ -81,7 +81,8 @@ class FlexibleDatePost(models.Model):
class UniqueErrorsModel(models.Model):
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):
generic_ip = models.GenericIPAddressField(blank=True, null=True, unique=True)
View
8 tests/modeltests/validation/test_unique.py
@@ -135,14 +135,14 @@ def test_unique_for_date_with_nullable_date(self):
self.fail("unique_for_month checks shouldn't trigger when the associated DateField is None.")
def test_unique_errors(self):
- m1 = UniqueErrorsModel.objects.create(name='Some Name', number=10)
- m = UniqueErrorsModel(name='Some Name', number=11)
+ m1 = UniqueErrorsModel.objects.create(name='Some Name', no=10)
+ m = UniqueErrorsModel(name='Some Name', no=11)
with self.assertRaises(ValidationError) as cm:
m.full_clean()
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:
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.']})
Please sign in to comment.
Something went wrong with that request. Please try again.