예제 #1
0
 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")
예제 #2
0
 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')
예제 #3
0
 def test_protection_key_not_set(self):
     table = Table()
     key = table.get_attr(CN('table:protection-key'))
     self.assertIsNone(key)
예제 #4
0
 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')
예제 #5
0
 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')
예제 #6
0
 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')
예제 #7
0
 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')
예제 #8
0
 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")
예제 #9
0
 def test_protection_key_not_set(self):
     table = Table()
     key = table.get_attr(CN('table:protection-key'))
     self.assertIsNone(key)
예제 #10
0
 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')
예제 #11
0
 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')
예제 #12
0
 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')