From 0123b67f6b8304a5c32a0fe98f97ae506977454b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pave=C5=82=20Ty=C5=9Blacki?= Date: Tue, 1 Jan 2019 17:39:58 +0300 Subject: Fixed #30060 -- Moved SQL generation for indexes and constraints to SchemaEditor. --- tests/constraints/tests.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/constraints') diff --git a/tests/constraints/tests.py b/tests/constraints/tests.py index d53892c3a3..995c5f461c 100644 --- a/tests/constraints/tests.py +++ b/tests/constraints/tests.py @@ -18,6 +18,18 @@ class BaseConstraintTests(SimpleTestCase): with self.assertRaisesMessage(NotImplementedError, msg): c.constraint_sql(None, None) + def test_create_sql(self): + c = BaseConstraint('name') + msg = 'This method must be implemented by a subclass.' + with self.assertRaisesMessage(NotImplementedError, msg): + c.create_sql(None, None) + + def test_remove_sql(self): + c = BaseConstraint('name') + msg = 'This method must be implemented by a subclass.' + with self.assertRaisesMessage(NotImplementedError, msg): + c.remove_sql(None, None) + class CheckConstraintTests(TestCase): def test_repr(self): -- cgit v1.2.1