Esempio n. 1
0
 def test_with_user_field(self):
     user_field_decl = UserFieldDecl(ZOE, 42)
     set_value(user_field_decl, ZOE)
     expected = (('<text:user-field-decl office:value-type="string" '
                  'office:string-value="%s" text:name="%s"/>') %
                 ((ZOE, ) * 2))
     self.assertEqual(user_field_decl.serialize(), expected)
Esempio n. 2
0
 def test_with_variable(self):
     variable_set = VarSet(ZOE, 42)
     set_value(variable_set, ZOE)
     expected = ('<text:variable-set office:value-type="string" '
                 'office:string-value="%s" text:name="%s" '
                 'text:display="none">'
                 '%s'
                 '</text:variable-set>') % (ZOE, ZOE, ZOE)
     self.assertEqual(variable_set.serialize(), expected)
Esempio n. 3
0
 def test_with_cell(self):
     cell = Cell(42)
     set_value(cell, ZOE)
     expected = ('<table:table-cell office:value-type="string" '
                 'office:string-value="%s">'
                 '<text:p>'
                 '%s'
                 '</text:p>'
                 '</table:table-cell>') % (ZOE, ZOE)
     self.assertEqual(cell.serialize(), expected)