Fixed #30060 -- Moved SQL generation for indexes and constraints to SchemaEditor.

This commit is contained in:
Paveł Tyślacki 2019-01-01 17:39:58 +03:00 committed by Tim Graham
parent e5ae9488ac
commit 0123b67f6b
8 changed files with 146 additions and 117 deletions

View file

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