Esempio n. 1
0
 def test_pack(self):
     t = forms_xso.ValueElement()
     v = t.pack("foo")
     self.assertIsInstance(
         v,
         forms_xso.Value
     )
     self.assertEqual(v.value, "foo")
Esempio n. 2
0
 def test_unpack(self):
     t = forms_xso.ValueElement()
     v = forms_xso.Value()
     v.value = "foobar"
     self.assertEqual(
         v.value,
         t.unpack(v)
     )
Esempio n. 3
0
 def test_parse(self):
     t = forms_xso.ValueElement()
     v = forms_xso.Value()
     v.value = "foobar"
     self.assertEqual(
         v.value,
         t.parse(v)
     )
Esempio n. 4
0
 def test_get_xso_types(self):
     t = forms_xso.ValueElement()
     self.assertCountEqual(
         t.get_xso_types(),
         [forms_xso.Value]
     )
Esempio n. 5
0
 def test_get_formatted_type(self):
     t = forms_xso.ValueElement()
     self.assertIs(t.get_formatted_type(), forms_xso.Value)