

def test_top_level(self):
    api = Api()
    api.register(NoteResource())
    api.register(UserResource())
    request = HttpRequest()
    resp = request.top_level(request)
    self.assertEqual(resp.status_code, 200)
    self.assertEqual(resp.content, '{"notes": {"list_endpoint": "/api/v1/notes/", "schema": "/api/v1/notes/schema/"}, "users": {"list_endpoint": "/api/v1/users/", "schema": "/api/v1/users/schema/"}}')

dataset/ETHPy150Open mozilla/inventory/vendor-local/src/django-tastypie/tests/core/tests/api.py ApiTestCase.test_top_level/VarMisuse@42/48 `api`->`request`