def testRemovingFooters(self): """Test removing footers""" table = Table('Test table', self.createContainer()) table.setColumnFooter('col1', 'Footer1') table.setColumnFooter('col2', 'Footer2') # Test removing footer self.assertNotEquals(table.getColumnFooter('col1'), None) table.setColumnFooter('col1', None) self.assertEquals(table.getColumnFooter('col1'), None) # The other footer should still be there self.assertNotEquals(table.getColumnFooter('col2'), None) # Remove non-existing footer table.setColumnFooter('fail', None)
def testAddingFooters(self): """Tests adding footers to the columns""" table = Table('Test table', self.createContainer()) # Table should not contain any footers at initialization self.assertIsNone(table.getColumnFooter('col1')) self.assertIsNone(table.getColumnFooter('col2')) self.assertIsNone(table.getColumnFooter('col3')) # Adding column footer table.setColumnFooter('col1', 'Footer1') self.assertEquals('Footer1', table.getColumnFooter('col1')) # Add another footer table.setColumnFooter('col2', 'Footer2') self.assertEquals('Footer2', table.getColumnFooter('col2')) # Add footer for a non-existing column table.setColumnFooter('fail', 'FooterFail')