mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #31815 -- Fixed schema value encoding on PostgreSQL.
This commit is contained in:
@@ -88,6 +88,12 @@ class CheckConstraintTests(TestCase):
|
||||
with self.assertRaises(IntegrityError):
|
||||
Product.objects.create(price=10, discounted_price=20)
|
||||
|
||||
@skipUnlessDBFeature('supports_table_check_constraints')
|
||||
def test_database_constraint_unicode(self):
|
||||
Product.objects.create(price=10, discounted_price=5, unit='μg/mL')
|
||||
with self.assertRaises(IntegrityError):
|
||||
Product.objects.create(price=10, discounted_price=7, unit='l')
|
||||
|
||||
@skipUnlessDBFeature('supports_table_check_constraints')
|
||||
def test_database_constraint_expression(self):
|
||||
Product.objects.create(price=999, discounted_price=5)
|
||||
|
||||
Reference in New Issue
Block a user