Mercurial > libervia-backend
comparison tests/e2e/conftest.py @ 3440:53da72a17139
tests (e2e): new fixture to share data between tests:
this is usefull in some edge cases when tests are dependents of each other.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 04 Dec 2020 12:38:38 +0100 |
parents | 42d6d00e4e8a |
children | be6d91572633 |
comparison
equal
deleted
inserted
replaced
3439:b166a59b1724 | 3440:53da72a17139 |
---|---|
233 @pytest.fixture | 233 @pytest.fixture |
234 def sent_emails(fake_smtp): | 234 def sent_emails(fake_smtp): |
235 """Catch email sent during the tests""" | 235 """Catch email sent during the tests""" |
236 SMTPMessageHandler.messages.clear() | 236 SMTPMessageHandler.messages.clear() |
237 return SMTPMessageHandler.messages | 237 return SMTPMessageHandler.messages |
238 | |
239 | |
240 @pytest.fixture(scope="class") | |
241 def shared_data(): | |
242 """A dictionary used for share data between dependent tests""" | |
243 return {} |