last but not least SA06 test fixes

This commit is contained in:
iElectric 2010-02-05 05:25:40 +01:00
parent 3dfb8c8a29
commit 230fcef65e

View File

@ -48,14 +48,18 @@ class TestAddDropColumn(fixture.DB):
result = len(self.table.primary_key) result = len(self.table.primary_key)
self.assertEquals(result, num_of_expected_cols) self.assertEquals(result, num_of_expected_cols)
# we have 1 columns and there is no data column
assert_numcols(1) assert_numcols(1)
self.assertTrue(getattr(self.table.c, 'data', None) is None)
if len(col_p) == 0: if len(col_p) == 0:
col_p = [String(40)] col_p = [String(40)]
col = Column(col_name, *col_p, **col_k) col = Column(col_name, *col_p, **col_k)
create_column_func(col) create_column_func(col)
assert_numcols(2) assert_numcols(2)
col2 = getattr(self.table.c, col_name) # data column exists
self.assertEquals(col2, col) self.assert_(self.table.c.data.type.length, 40)
col2 = self.table.c.data
drop_column_func(col2) drop_column_func(col2)
assert_numcols(1) assert_numcols(1)