From 4b0c4ae7d0cabbcc79e539aa342d7d0b11050af4 Mon Sep 17 00:00:00 2001 From: long2ice Date: Mon, 21 Sep 2020 15:03:16 +0800 Subject: [PATCH] fix test error --- tests/test_ddl.py | 2 ++ tests/test_migrate.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/test_ddl.py b/tests/test_ddl.py index d68cd18..7140ed8 100644 --- a/tests/test_ddl.py +++ b/tests/test_ddl.py @@ -136,6 +136,8 @@ def test_drop_column(): if isinstance(Migrate.ddl, SqliteDDL): with pytest.raises(NotSupportError): ret = Migrate.ddl.drop_column(Category, "name") + else: + ret = Migrate.ddl.drop_column(Category, "name") if isinstance(Migrate.ddl, MysqlDDL): assert ret == "ALTER TABLE `category` DROP COLUMN `name`" elif isinstance(Migrate.ddl, PostgresDDL): diff --git a/tests/test_migrate.py b/tests/test_migrate.py index e36f4dd..3d6a65e 100644 --- a/tests/test_migrate.py +++ b/tests/test_migrate.py @@ -16,6 +16,8 @@ def test_migrate(): if isinstance(Migrate.ddl, SqliteDDL): with pytest.raises(NotSupportError): Migrate.diff_models(models, diff_models, False) + else: + Migrate.diff_models(models, diff_models, False) if isinstance(Migrate.ddl, MysqlDDL): assert Migrate.upgrade_operators == [ "ALTER TABLE `category` ADD `name` VARCHAR(200) NOT NULL",