diff options
author | Daniel Schadt <kingdread@gmx.de> | 2023-11-13 18:35:03 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2023-11-13 18:35:03 +0100 |
commit | eac4f7a7f7fec9585a7c080400c4ae8fa9b67578 (patch) | |
tree | 21932471bf6fbe7ba424cae1223bf6468d8176d5 /tests/playwright | |
parent | 9a31dd6651d8a47943e63db212bce7245a152450 (diff) | |
download | fietsboek-eac4f7a7f7fec9585a7c080400c4ae8fa9b67578.tar.gz fietsboek-eac4f7a7f7fec9585a7c080400c4ae8fa9b67578.tar.bz2 fietsboek-eac4f7a7f7fec9585a7c080400c4ae8fa9b67578.zip |
make test app fixture module-scoped
Previously, we had it session-scoped, which meant that the app was
created once for all tests. This doesn't allow us to play with different
settings however, such as disabling account registration or image
uploads and testing that.
Now, the fixtures are module scoped, which means that we still save on
prepare/teardown time a bit, but we're also a bit more flexible. By
making new test modules, we can test different settings there.
Diffstat (limited to 'tests/playwright')
-rw-r--r-- | tests/playwright/conftest.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/playwright/conftest.py b/tests/playwright/conftest.py index 12a0047..4e7f5a4 100644 --- a/tests/playwright/conftest.py +++ b/tests/playwright/conftest.py @@ -15,7 +15,7 @@ from fietsboek.config import Config import pytest -@pytest.fixture(scope="session") +@pytest.fixture(scope="module") def server_port(): """Return a (likely) free port. @@ -29,7 +29,7 @@ def server_port(): return port -@pytest.fixture(scope="session", autouse=True) +@pytest.fixture(scope="module", autouse=True) def running_server(server_port, app): """Have the app running as an actual server.""" server = simple_server.make_server("127.0.0.1", server_port, app) |