MCPcopy
hub / github.com/hugapi/hug / hug_api

Function hug_api

tests/fixtures.py:17–25  ·  view source on GitHub ↗

Defines a dependency for and then includes a uniquely identified hug API for a single test case

()

Source from the content-addressed store, hash-verified

15
16@pytest.fixture
17def hug_api():
18 """Defines a dependency for and then includes a uniquely identified hug API for a single test case"""
19 api = TestAPI("fake_api_{}".format(randint(0, 1000000)))
20 api.route = Routers(
21 hug.routing.URLRouter().api(api),
22 hug.routing.LocalRouter().api(api),
23 hug.routing.CLIRouter().api(api),
24 )
25 return api
26
27
28@pytest.fixture

Callers

nothing calls this directly

Calls 2

TestAPIClass · 0.70
apiMethod · 0.45

Tested by

no test coverage detected