Defines a dependency for and then includes a uniquely identified hug API for a single test case
()
| 15 | |
| 16 | @pytest.fixture |
| 17 | def 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 |