Beispiel #1
0
 def test_boolean_deserialize(self):
     """
     BooleanAttribute.deserialize
     """
     attr = BooleanAttribute()
     assert attr.deserialize(True) is True
     assert attr.deserialize(False) is False
Beispiel #2
0
 def test_boolean_deserialize(self):
     """
     BooleanAttribute.deserialize
     """
     attr = BooleanAttribute()
     self.assertEqual(attr.deserialize('1'), True)
     self.assertEqual(attr.deserialize('0'), True)
     self.assertEqual(attr.deserialize(True), True)
     self.assertEqual(attr.deserialize(False), False)
Beispiel #3
0
 def test_boolean_deserialize(self):
     """
     BooleanAttribute.deserialize
     """
     attr = BooleanAttribute()
     assert attr.deserialize('1') is True
     assert attr.deserialize('0') is True
     assert attr.deserialize(True) is True
     assert attr.deserialize(False) is False
Beispiel #4
0
 def test_boolean_deserialize(self):
     """
     BooleanAttribute.deserialize
     """
     attr = BooleanAttribute()
     self.assertEqual(attr.deserialize('1'), True)
     self.assertEqual(attr.deserialize('0'), False)