diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_batch.py | 2 | ||||
-rw-r--r-- | tests/test_mssql.py | 2 | ||||
-rw-r--r-- | tests/test_mysql.py | 18 | ||||
-rw-r--r-- | tests/test_oracle.py | 2 | ||||
-rw-r--r-- | tests/test_postgresql.py | 12 |
5 files changed, 22 insertions, 14 deletions
diff --git a/tests/test_batch.py b/tests/test_batch.py index 52f9baf..66d59fd 100644 --- a/tests/test_batch.py +++ b/tests/test_batch.py @@ -1778,7 +1778,7 @@ class BatchRoundTripTest(TestBase): with self.op.batch_alter_table( "ck_table", recreate=recreate ) as batch_op: - batch_op.drop_constraint("ck", "check") + batch_op.drop_constraint("ck", type_="check") ck_consts = inspect(self.conn).get_check_constraints("ck_table") eq_(ck_consts, []) diff --git a/tests/test_mssql.py b/tests/test_mssql.py index 640e168..b785e2f 100644 --- a/tests/test_mssql.py +++ b/tests/test_mssql.py @@ -158,7 +158,7 @@ class OpTest(TestBase): def test_drop_index(self): context = op_fixture("mssql") - op.drop_index("my_idx", "my_table") + op.drop_index("my_idx", table_name="my_table") context.assert_contains("DROP INDEX my_idx ON my_table") def test_drop_column_w_default(self): diff --git a/tests/test_mysql.py b/tests/test_mysql.py index 92c1819..fd3b185 100644 --- a/tests/test_mysql.py +++ b/tests/test_mysql.py @@ -396,12 +396,12 @@ class MySQLOpTest(TestBase): def test_drop_fk(self): context = op_fixture("mysql") - op.drop_constraint("f1", "t1", "foreignkey") + op.drop_constraint("f1", "t1", type_="foreignkey") context.assert_("ALTER TABLE t1 DROP FOREIGN KEY f1") def test_drop_fk_quoted(self): context = op_fixture("mysql") - op.drop_constraint("MyFk", "MyTable", "foreignkey") + op.drop_constraint("MyFk", "MyTable", type_="foreignkey") context.assert_("ALTER TABLE `MyTable` DROP FOREIGN KEY `MyFk`") def test_drop_constraint_primary(self): @@ -411,32 +411,32 @@ class MySQLOpTest(TestBase): def test_drop_unique(self): context = op_fixture("mysql") - op.drop_constraint("f1", "t1", "unique") + op.drop_constraint("f1", "t1", type_="unique") context.assert_("ALTER TABLE t1 DROP INDEX f1") def test_drop_unique_quoted(self): context = op_fixture("mysql") - op.drop_constraint("MyUnique", "MyTable", "unique") + op.drop_constraint("MyUnique", "MyTable", type_="unique") context.assert_("ALTER TABLE `MyTable` DROP INDEX `MyUnique`") def test_drop_check_mariadb(self): context = op_fixture("mariadb") - op.drop_constraint("f1", "t1", "check") + op.drop_constraint("f1", "t1", type_="check") context.assert_("ALTER TABLE t1 DROP CONSTRAINT f1") def test_drop_check_quoted_mariadb(self): context = op_fixture("mariadb") - op.drop_constraint("MyCheck", "MyTable", "check") + op.drop_constraint("MyCheck", "MyTable", type_="check") context.assert_("ALTER TABLE `MyTable` DROP CONSTRAINT `MyCheck`") def test_drop_check_mysql(self): context = op_fixture("mysql") - op.drop_constraint("f1", "t1", "check") + op.drop_constraint("f1", "t1", type_="check") context.assert_("ALTER TABLE t1 DROP CHECK f1") def test_drop_check_quoted_mysql(self): context = op_fixture("mysql") - op.drop_constraint("MyCheck", "MyTable", "check") + op.drop_constraint("MyCheck", "MyTable", type_="check") context.assert_("ALTER TABLE `MyTable` DROP CHECK `MyCheck`") def test_drop_unknown(self): @@ -448,7 +448,7 @@ class MySQLOpTest(TestBase): op.drop_constraint, "f1", "t1", - "typo", + type_="typo", ) def test_drop_generic_constraint(self): diff --git a/tests/test_oracle.py b/tests/test_oracle.py index f84c0e1..63ac1c4 100644 --- a/tests/test_oracle.py +++ b/tests/test_oracle.py @@ -163,7 +163,7 @@ class OpTest(TestBase): def test_drop_index(self): context = op_fixture("oracle") - op.drop_index("my_idx", "my_table") + op.drop_index("my_idx", table_name="my_table") context.assert_contains("DROP INDEX my_idx") def test_drop_column_w_default(self): diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py index 818dae7..82a3f3b 100644 --- a/tests/test_postgresql.py +++ b/tests/test_postgresql.py @@ -122,9 +122,17 @@ class PostgresqlOpTest(TestBase): op.create_index("i", "t", ["c1", "c2"], unique=False) context.assert_("CREATE INDEX i ON t (c1, c2)") - def test_drop_index_postgresql_concurrently(self): + @config.combinations("include_table", "no_table", argnames="include_table") + def test_drop_index_postgresql_concurrently(self, include_table): context = op_fixture("postgresql") - op.drop_index("geocoded", "locations", postgresql_concurrently=True) + if include_table == "include_table": + op.drop_index( + "geocoded", + table_name="locations", + postgresql_concurrently=True, + ) + else: + op.drop_index("geocoded", postgresql_concurrently=True) context.assert_("DROP INDEX CONCURRENTLY geocoded") def test_alter_column_type_using(self): |