You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
442 B

from fastapi.testclient import TestClient
from pytest import MonkeyPatch
from docs_src.settings.app02 import main, test_main
client = TestClient(main.app)
def test_settings(monkeypatch: MonkeyPatch):
monkeypatch.setenv("ADMIN_EMAIL", "[email protected]")
settings = main.get_settings()
assert settings.app_name == "Awesome API"
assert settings.items_per_user == 50
def test_override_settings():
test_main.test_app()