From b034e46543f68c632580cfc13fb1910d358bcf8b Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 4 Dec 2020 12:38:38 +0100 Subject: [PATCH] tests (e2e): new fixture to share data between tests: this is usefull in some edge cases when tests are dependents of each other. --- tests/e2e/conftest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/e2e/conftest.py b/tests/e2e/conftest.py index 00876c19..4a1e5363 100644 --- a/tests/e2e/conftest.py +++ b/tests/e2e/conftest.py @@ -235,3 +235,9 @@ def sent_emails(fake_smtp): """Catch email sent during the tests""" SMTPMessageHandler.messages.clear() return SMTPMessageHandler.messages + + +@pytest.fixture(scope="class") +def shared_data(): + """A dictionary used for share data between dependent tests""" + return {}