Exemplo n.º 1
0
 def test_to_xml_no_encoding(self):
     b = Behavior()
     b.description = UNICODE_STR
     xml = b.to_xml(encoding=None)
     self.assertTrue(isinstance(xml, unicode))
     self.assertTrue(UNICODE_STR in xml)
Exemplo n.º 2
0
 def test_to_xml_default_encoded(self):
     b = Behavior()
     b.description = UNICODE_STR
     xml = b.to_xml()
     self.assertTrue(UNICODE_STR in xml.decode('utf-8'))
Exemplo n.º 3
0
 def test_to_xml_utf16_encoded(self):
     encoding = 'utf-16'
     b = Behavior()
     b.description = UNICODE_STR
     xml = b.to_xml(encoding=encoding)
     self.assertTrue(UNICODE_STR in xml.decode(encoding))
Exemplo n.º 4
0
 def test_to_xml_no_encoding(self):
     b = Behavior()
     b.description = UNICODE_STR
     xml = b.to_xml(encoding=None)
     self.assertTrue(isinstance(xml, text_type))
     self.assertTrue(UNICODE_STR in xml)
Exemplo n.º 5
0
 def test_to_xml_default_encoded(self):
     b = Behavior()
     b.description = UNICODE_STR
     xml = b.to_xml()
     self.assertTrue(UNICODE_STR in xml.decode('utf-8'))
Exemplo n.º 6
0
 def test_to_xml_utf16_encoded(self):
     encoding = 'utf-16'
     b = Behavior()
     b.description = UNICODE_STR
     xml = b.to_xml(encoding=encoding)
     self.assertTrue(UNICODE_STR in xml.decode(encoding))