def test_check_allowed_visibility_state(self): table_col = TableColumn() table_col.visibility = 'collapse' table_col.visibility = 'visible' table_col.visibility = 'filter' with self.assertRaises(ValueError): table_col.visibility = 'invalid'
def test_set_default_cell_style_name(self): table_col = TableColumn() table_col.default_cell_style_name = 'DEFAULT' self.assertEqual(table_col.default_cell_style_name, 'DEFAULT') self.assertEqual( table_col.get_attr(CN('table:default-cell-style-name')), 'DEFAULT', 'wrong tag name')
def test_set_default_cell_style_name(self): table_col = TableColumn() table_col.default_cell_style_name = 'DEFAULT' self.assertEqual(table_col.default_cell_style_name, 'DEFAULT') self.assertEqual(table_col.get_attr(CN('table:default-cell-style-name')), 'DEFAULT', 'wrong tag name')
def test_set_visibility_state(self): table_col = TableColumn() table_col.visibility = 'collapse' self.assertEqual(table_col.visibility, 'collapse') self.assertEqual(table_col.get_attr(CN('table:visibility')), 'collapse', 'wrong tag name')
def test_set_style_name(self): table_col = TableColumn() table_col.style_name = 'STYLE' self.assertEqual(table_col.style_name, 'STYLE') self.assertEqual(table_col.get_attr(CN('table:style-name')), 'STYLE', 'wrong tag name')
def test_get_default_cell_style_name(self): table_col = TableColumn() self.assertIsNone(table_col.default_cell_style_name)
def test_is_visible_by_default(self): table_col = TableColumn() self.assertEqual(table_col.visibility, 'visible')
def test_get_style_name(self): table_col = TableColumn() self.assertIsNone(table_col.style_name)
def test_has_xmlnode(self): table_col = TableColumn() self.assertIsNotNone(table_col.xmlnode)
def test_has_TAG(self): table_col = TableColumn() self.assertEqual(table_col.TAG, CN('table:table-column'))