MCPcopy Create free account
hub / github.com/STIXProject/python-stix / round_trip_dict

Function round_trip_dict

stix/test/__init__.py:49–55  ·  view source on GitHub ↗
(cls, dict_)

Source from the content-addressed store, hash-verified

47
48
49def round_trip_dict(cls, dict_):
50 obj = cls.object_from_dict(dict_)
51 dict2 = cls.dict_from_object(obj)
52
53 api_obj = cls.from_dict(dict_)
54 dict2 = cls.to_dict(api_obj)
55 return dict2
56
57
58def round_trip(o, output=False, list_=False):

Callers 2

_test_round_trip_dictMethod · 0.85

Calls 4

object_from_dictMethod · 0.80
dict_from_objectMethod · 0.80
from_dictMethod · 0.45
to_dictMethod · 0.45

Tested by 1