def test_datetime_with_mysql(self, registry_plugin): report = MigrationReport(registry_plugin.migration, []) res = report.init_modify_type( [None, None, 'test', 'other', {}, DATETIME(), DATETIME()]) assert res is True
def test_alter_column_type_with_plugin_4(self, registry_plugin): report = MigrationReport(registry_plugin.migration, []) report.plugins = [ MockMigrationColumnTypePluginInteger2StringMySQL, ] with patch('anyblok.migration.MigrationColumn.alter') as mockapply: report.apply_change_modify_type( [None, None, 'test', 'other', {}, Integer(), String()]) mockapply.assert_called()
def test_boolean_with_postgres(self, registry_plugin): report = MigrationReport(registry_plugin.migration, []) res = report.init_modify_type( [None, None, 'test', 'other', {}, Integer(), Boolean()]) assert res is False
def test_boolean_with_mssql(self, registry_plugin): report = MigrationReport(registry_plugin.migration, []) res = report.init_modify_type( [None, None, 'test', 'other', {}, BIT(), Boolean()]) assert res is True