[test] widen scope of random-name fixture

This commit is contained in:
bronsen 2025-03-15 22:33:14 +01:00
parent 16503bea7a
commit 7c825e15cf

View file

@ -15,7 +15,7 @@ def enable_db_access_for_all_tests(db):
def fixture_longlived_client() -> Client:
return Client()
@pytest.fixture(name="random_name")
@pytest.fixture(name="random_name", scope="session")
def fixture_random_name_generator() -> Callable[[int], str]:
def name_generator(length: int = 7) -> str:
name = "".join(random.choices(string.ascii_letters, k=length))