MCPcopy
hub / github.com/marshmallow-code/marshmallow / test_two_way_nesting

Function test_two_way_nesting

tests/test_registry.py:156–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154
155
156def test_two_way_nesting():
157 a_obj = A(1)
158 b_obj = B(2, a=a_obj)
159 a_obj.b = b_obj
160
161 a_serialized = ASchema().dump(a_obj)
162 b_serialized = BSchema().dump(b_obj)
163 assert a_serialized["b"]["id"] == b_obj.id
164 assert b_serialized["a"]["id"] == a_obj.id
165
166
167def test_nesting_with_class_name_many():

Callers

nothing calls this directly

Calls 5

AClass · 0.85
BClass · 0.85
BSchemaClass · 0.85
dumpMethod · 0.80
ASchemaClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…