def test_protection_key_is_set(self): table = Table() table.protected = True key = table.get_attr(CN('table:protection-key')) self.assertIsNotNone(key, "protection-key not set") self.assertGreater(len(key), 8, "protection-key is too short")
def test_set_protected(self): table = Table() table.protected = True self.assertTrue(table.protected) self.assertEqual(table.get_attr(CN('table:protected')), 'true', 'wrong tag name')
def test_protection_key_not_set(self): table = Table() key = table.get_attr(CN('table:protection-key')) self.assertIsNone(key)
def test_set_name(self): table = Table() table.name = 'TABLE' self.assertEqual(table.name, 'TABLE') self.assertEqual(table.get_attr(CN('table:name')), 'TABLE', 'wrong tag name')
def test_set_style_name(self): table = Table() table.style_name = 'STYLE' self.assertEqual(table.style_name, 'STYLE') self.assertEqual(table.get_attr(CN('table:style-name')), 'STYLE', 'wrong tag name')
def test_set_print(self): table = Table() table.print_ = True self.assertTrue(table.print_) self.assertEqual(table.get_attr(CN('table:print')), 'true', 'table:print should be true')