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')