Fixed #31815 -- Fixed schema value encoding on PostgreSQL.

This commit is contained in:
Mariusz Felisiak 2020-07-27 06:39:02 +02:00 committed by GitHub
parent c1f8d87bb0
commit f4e93919e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 1 deletions

View file

@ -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)