diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2019-07-14 01:24:35 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-07-19 11:05:06 +0200 |
| commit | 1fc2c70f7613e014a31771afa537439b28dd35fb (patch) | |
| tree | dae8ebfe89e687edb518bd6031d89f9c47f774c9 /tests/constraints | |
| parent | 7f612eda80db1c1c8e502aced54c2062080eae46 (diff) | |
Fixed #30593 -- Added support for check constraints on MariaDB 10.2+.
Diffstat (limited to 'tests/constraints')
| -rw-r--r-- | tests/constraints/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/constraints/tests.py b/tests/constraints/tests.py index c2f99c565d..7ac478a89f 100644 --- a/tests/constraints/tests.py +++ b/tests/constraints/tests.py @@ -73,7 +73,7 @@ class CheckConstraintTests(TestCase): with self.assertRaises(IntegrityError): Product.objects.create(name='Invalid', price=10, discounted_price=20) - @skipUnlessDBFeature('supports_table_check_constraints') + @skipUnlessDBFeature('supports_table_check_constraints', 'can_introspect_check_constraints') def test_name(self): constraints = get_constraints(Product._meta.db_table) for expected_name in ( @@ -83,7 +83,7 @@ class CheckConstraintTests(TestCase): with self.subTest(expected_name): self.assertIn(expected_name, constraints) - @skipUnlessDBFeature('supports_table_check_constraints') + @skipUnlessDBFeature('supports_table_check_constraints', 'can_introspect_check_constraints') def test_abstract_name(self): constraints = get_constraints(ChildModel._meta.db_table) self.assertIn('constraints_childmodel_adult', constraints) |
