summaryrefslogtreecommitdiff
path: root/tests/constraints
diff options
context:
space:
mode:
authorPaveł Tyślacki <tbicr@users.noreply.github.com>2019-01-01 17:39:58 +0300
committerTim Graham <timograham@gmail.com>2019-01-01 09:39:58 -0500
commit0123b67f6b8304a5c32a0fe98f97ae506977454b (patch)
tree42343d14292507192c1a2266544fe84562ccb74b /tests/constraints
parente5ae9488acd45a9758ed5c70240a7e3fad417c00 (diff)
downloaddjango-0123b67f6b8304a5c32a0fe98f97ae506977454b.tar.gz
Fixed #30060 -- Moved SQL generation for indexes and constraints to SchemaEditor.
Diffstat (limited to 'tests/constraints')
-rw-r--r--tests/constraints/tests.py12
1 files changed, 12 insertions, 0 deletions
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):