def test_get_or_create_json_object(self):
        x = JsonObject(foo=5, bar=True)
        y = JsonObject(bar=x)

        self.assertTrue(y.get_or_create_json_object("bar") == x)
        self.assertEquals(len(y.get_or_create_json_object("foo")), 0)
    def test_get_or_create_json_object(self):
        x = JsonObject(foo=5, bar=True)
        y = JsonObject(bar=x)

        self.assertTrue(y.get_or_create_json_object("bar") == x)
        self.assertEquals(len(y.get_or_create_json_object("foo")), 0)