Esempio n. 1
0
 def test_set_content_validation_name(self):
     cell = Cell()
     cell.content_validation_name = 'validation'
     self.assertEqual(cell.content_validation_name, 'validation')
     self.assertEqual(cell.get_attr(CN('table:content-validation-name')), 'validation',
                      'wrong tag name')
Esempio n. 2
0
 def test_cover_cell_and_remove_unwanted_tags(self):
     cell = Cell()
     cell._set_span((2, 2))
     cell._set_covered(True)
     self.assertIsNone(cell.get_attr(CN('table:number-rows-spanned')))
     self.assertIsNone(cell.get_attr(CN('table:number-colums-spanned')))
Esempio n. 3
0
 def test_set_style_name(self):
     cell = Cell()
     cell.style_name = 'STYLE'
     self.assertEqual(cell.style_name, 'STYLE')
     self.assertEqual(cell.get_attr(CN('table:style-name')), 'STYLE', 'wrong tag name')
Esempio n. 4
0
 def test_set_formula(self):
     cell = Cell()
     cell.formula = "=[.A1]"
     self.assertEqual(cell.formula, "=[.A1]")
     self.assertEqual(cell.get_attr(CN('table:formula')), "=[.A1]",
                      'wrong tag name')
Esempio n. 5
0
 def test_set_value_type(self):
     cell = Cell()
     cell.set_value('a string')
     self.assertEqual(cell.value_type, 'string')
     self.assertEqual(cell.get_attr(CN('office:value-type')), 'string',
                      'wrong tag name')
Esempio n. 6
0
 def test_set_style_name(self):
     cell = Cell()
     cell.style_name = 'STYLE'
     self.assertEqual(cell.style_name, 'STYLE')
     self.assertEqual(cell.get_attr(CN('table:style-name')), 'STYLE',
                      'wrong tag name')
Esempio n. 7
0
 def test_cover_cell_and_remove_unwanted_tags(self):
     cell = Cell()
     cell._set_span((2, 2))
     cell._set_covered(True)
     self.assertIsNone(cell.get_attr(CN('table:number-rows-spanned')))
     self.assertIsNone(cell.get_attr(CN('table:number-colums-spanned')))
Esempio n. 8
0
 def test_set_value_type(self):
     cell = Cell()
     cell.set_value('a string')
     self.assertEqual(cell.value_type, 'string')
     self.assertEqual(cell.get_attr(CN('office:value-type')), 'string',
                      'wrong tag name')
Esempio n. 9
0
 def test_set_formula(self):
     cell = Cell()
     cell.formula = "=[.A1]"
     self.assertEqual(cell.formula, "=[.A1]")
     self.assertEqual(cell.get_attr(CN('table:formula')), "=[.A1]",
                      'wrong tag name')
Esempio n. 10
0
 def test_set_content_validation_name(self):
     cell = Cell()
     cell.content_validation_name = 'validation'
     self.assertEqual(cell.content_validation_name, 'validation')
     self.assertEqual(cell.get_attr(CN('table:content-validation-name')),
                      'validation', 'wrong tag name')