Exemplo n.º 1
0
 def test_from_json_with_nonstring_value_encrypted(self):
     field = EncryptedDeviceField.from_json({'name': 'test_name', 'type': 'boolean', 'value': True})
     self.assertConstructionIsCorrect(field, 'test_name', 'boolean', True)
Exemplo n.º 2
0
 def test_from_json_with_invalid_type_encrypted(self):
     field = EncryptedDeviceField.from_json({'name': 'test_name', 'type': 'invalid', 'value': 'true'})
     self.assertConstructionIsCorrect(field, 'test_name', 'string', 'true')
Exemplo n.º 3
0
 def test_from_json_encrypted(self):
     field = EncryptedDeviceField.from_json({'name': 'test_name', 'type': 'string', 'value': 'abcd'})
     self.assertConstructionIsCorrect(field, 'test_name', 'string', 'abcd')