def test_dumps(): c = Foo(id = "foo") assert_equals(fieldmarshal.dumps(c), json.dumps({"id": "foo"}))
def test_recursive_dumps(): c = Nested(foo = Foo(id = "foo")) assert_equals(fieldmarshal.dumps(c), json.dumps({"foo": {"id": "foo"}}))