fix test error
This commit is contained in:
parent
dc821d8a02
commit
4b0c4ae7d0
@ -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):
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user