Package cm_api_tests :: Module utils
[hide private]
[frames] | no frames]

Module utils

source code

Classes [hide private]
  MockResource
Allows code to control the behavior of a resource's "invoke" method for unit testing.
Functions [hide private]
 
deserialize(raw_data, cls)
Deserializes raw JSON data into an instance of cls.
source code
Variables [hide private]
  __package__ = 'cm_api_tests'
Function Details [hide private]

deserialize(raw_data, cls)

source code 

Deserializes raw JSON data into an instance of cls.

The data is deserialized, serialized again using the class's to_json_dict() implementation, and deserialized again, to make sure both from_json_dict() and to_json_dict() are working.