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')
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)
def test_from_json_encrypted(self): field = EncryptedDeviceField.from_json({'name': 'test_name', 'type': 'string', 'value': 'abcd'}) self.assertConstructionIsCorrect(field, 'test_name', 'string', 'abcd')