fix test error
This commit is contained in:
		| @@ -136,6 +136,8 @@ def test_drop_column(): | |||||||
|     if isinstance(Migrate.ddl, SqliteDDL): |     if isinstance(Migrate.ddl, SqliteDDL): | ||||||
|         with pytest.raises(NotSupportError): |         with pytest.raises(NotSupportError): | ||||||
|             ret = Migrate.ddl.drop_column(Category, "name") |             ret = Migrate.ddl.drop_column(Category, "name") | ||||||
|  |     else: | ||||||
|  |         ret = Migrate.ddl.drop_column(Category, "name") | ||||||
|     if isinstance(Migrate.ddl, MysqlDDL): |     if isinstance(Migrate.ddl, MysqlDDL): | ||||||
|         assert ret == "ALTER TABLE `category` DROP COLUMN `name`" |         assert ret == "ALTER TABLE `category` DROP COLUMN `name`" | ||||||
|     elif isinstance(Migrate.ddl, PostgresDDL): |     elif isinstance(Migrate.ddl, PostgresDDL): | ||||||
|   | |||||||
| @@ -16,6 +16,8 @@ def test_migrate(): | |||||||
|     if isinstance(Migrate.ddl, SqliteDDL): |     if isinstance(Migrate.ddl, SqliteDDL): | ||||||
|         with pytest.raises(NotSupportError): |         with pytest.raises(NotSupportError): | ||||||
|             Migrate.diff_models(models, diff_models, False) |             Migrate.diff_models(models, diff_models, False) | ||||||
|  |     else: | ||||||
|  |         Migrate.diff_models(models, diff_models, False) | ||||||
|     if isinstance(Migrate.ddl, MysqlDDL): |     if isinstance(Migrate.ddl, MysqlDDL): | ||||||
|         assert Migrate.upgrade_operators == [ |         assert Migrate.upgrade_operators == [ | ||||||
|             "ALTER TABLE `category` ADD `name` VARCHAR(200) NOT NULL", |             "ALTER TABLE `category` ADD `name` VARCHAR(200) NOT NULL", | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user