Browse Source

Fix coverage

pull/14992/head
Yurii Motov 5 months ago
parent
commit
d61938836b
  1. 2
      tests/test_tutorial/test_settings/test_app01.py

2
tests/test_tutorial/test_settings/test_app01.py

@ -22,7 +22,7 @@ def get_mod_name(request: pytest.FixtureRequest):
@pytest.fixture(name="client") @pytest.fixture(name="client")
def get_test_client(mod_name: str, monkeypatch: MonkeyPatch) -> TestClient: def get_test_client(mod_name: str, monkeypatch: MonkeyPatch) -> TestClient:
if mod_name in sys.modules: if mod_name in sys.modules:
del sys.modules[mod_name] del sys.modules[mod_name] # pragma: no cover
monkeypatch.setenv("ADMIN_EMAIL", "[email protected]") monkeypatch.setenv("ADMIN_EMAIL", "[email protected]")
main_mod = importlib.import_module(mod_name) main_mod = importlib.import_module(mod_name)
return TestClient(main_mod.app) return TestClient(main_mod.app)

Loading…
Cancel
Save