def test_deeper_load(): resp = json.dumps({"nested": {"foo": {"id": "foo"}}}) c = fieldmarshal.loads(SuperNested, resp) assert_equals(c.nested.foo.id, "foo")
def test_loads(): resp = json.dumps({"id": "foo"}) c = fieldmarshal.loads(Foo, resp) assert_equals(c.id, "foo")
def test_recursive_load(): resp = json.dumps({"foo": {"id": "foo"}}) c = fieldmarshal.loads(Nested, resp) assert_equals(c.foo.id, "foo")