| Conditions | 1 |
| Total Lines | 15 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # tests/test_fakeapi.py |
||
| 24 | @pytest.fixture(scope="session") |
||
| 25 | def fake_api(): |
||
| 26 | """ |
||
| 27 | Yield api inerface when needed. |
||
| 28 | |||
| 29 | Scope set to session, to only create once per test session. |
||
| 30 | |||
| 31 | Yields |
||
| 32 | ------ |
||
| 33 | FakeAPI |
||
| 34 | FakeAPI instance using a localhost as url. |
||
| 35 | """ |
||
| 36 | api = FakeAPI.create() |
||
| 37 | yield api |
||
| 38 | api.shutdown() |
||
| 39 |