]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Additional tests for dropping of an ExcludeConstraint
authord3 <david.hills@florincourt.com>
Thu, 24 Aug 2023 14:54:48 +0000 (15:54 +0100)
committerd3 <david.hills@florincourt.com>
Thu, 24 Aug 2023 14:54:48 +0000 (15:54 +0100)
tests/test_op.py
tests/test_postgresql.py

index 64632443d1348cd0ff4874709e751e201e914139..403a94aaaba493a735577889b04c8db85d3a9d05 100644 (file)
@@ -808,6 +808,11 @@ class OpTest(TestBase):
         op.drop_constraint("foo_bar_bat", "t1", type_="foreignkey")
         context.assert_("ALTER TABLE t1 DROP CONSTRAINT foo_bar_bat")
 
+    def test_drop_constraint_type_generic(self):
+        context = op_fixture()
+        op.drop_constraint("foo_bar_bat", "t1")
+        context.assert_("ALTER TABLE t1 DROP CONSTRAINT foo_bar_bat")
+
     def test_drop_constraint_legacy_type(self):
         """#1245"""
         context = op_fixture()
index e9242cbaf64ebb45be5b656e37acf66aac4b9e40..3bb1e76672738251feb5a2d7c8675bde176eff42 100644 (file)
@@ -1279,7 +1279,7 @@ class PostgresqlAutogenRenderTest(TestBase):
 
         eq_ignore_whitespace(
             autogenerate.render_op_text(autogen_context, op_obj),
-            "op.drop_constraint('t_excl_x', 'TTable',  type_='generic')",
+            "op.drop_constraint('t_excl_x', 'TTable')",
         )
 
     def test_json_type(self):