fix for changeset test

This commit is contained in:
jan.dittberner 2009-01-10 13:38:44 +00:00
parent 979b8b19dc
commit 88ab816187

View File

@ -153,11 +153,11 @@ class TestAddDropColumn(fixture.DB):
reftable = Table('tmp_ref',self.meta, reftable = Table('tmp_ref',self.meta,
Column('id',Integer,primary_key=True), Column('id',Integer,primary_key=True),
) )
# create FK's target
if self.engine.has_table(reftable.name):
reftable.drop()
reftable.create()
def add_func(col): def add_func(col):
# create FK's target
if self.engine.has_table(reftable.name):
reftable.drop()
reftable.create()
self.table.append_column(col) self.table.append_column(col)
return create_column(col.name,self.table) return create_column(col.name,self.table)
def drop_func(col): def drop_func(col):
@ -165,7 +165,8 @@ class TestAddDropColumn(fixture.DB):
if self.engine.has_table(reftable.name): if self.engine.has_table(reftable.name):
reftable.drop() reftable.drop()
return ret return ret
return self.run_(add_func,drop_func,Integer,ForeignKey('tmp_ref.id')) return self.run_(add_func,drop_func,Integer,
ForeignKey(reftable.c.id))
#@fixture.usedb() #@fixture.usedb()
#def xtest_pk(self): #def xtest_pk(self):