mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
tests: Use background fixture for each test
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
1 parent
84ab4b3b3c
commit
3043574eb0
3 files changed
+9
-16
No files matched your search
@@ -17,18 +17,15 @@ class TestMatrixSynapseApp(functional.BaseAppTests):
|
||||
has_web = False
|
||||
|
||||
@pytest.fixture(scope='class', autouse=True)
|
||||
def fixture_background(self, session_browser):
|
||||
"""Login and install the app."""
|
||||
def fixture_setup(self, session_browser):
|
||||
"""Setup the app."""
|
||||
functional.login(session_browser)
|
||||
functional.set_domain_name(session_browser, 'mydomain.example')
|
||||
functional.install(session_browser, self.app_name)
|
||||
functional.app_select_domain_name(session_browser, self.app_name,
|
||||
'mydomain.example')
|
||||
yield
|
||||
functional.app_disable(session_browser, self.app_name)
|
||||
|
||||
def test_run_diagnostics(self, session_browser):
|
||||
"""Add a short delay before checking diagnostics."""
|
||||
functional.app_enable(session_browser, self.app_name)
|
||||
time.sleep(1)
|
||||
super().test_run_diagnostics(session_browser)
|
||||
@@ -15,13 +15,11 @@ class TestZophApp(functional.BaseAppTests):
|
||||
has_web = True
|
||||
|
||||
@pytest.fixture(scope='class', autouse=True)
|
||||
def fixture_background(self, session_browser):
|
||||
"""Login and install the app."""
|
||||
def fixture_setup(self, session_browser):
|
||||
"""Setup the app."""
|
||||
functional.login(session_browser)
|
||||
functional.install(session_browser, self.app_name)
|
||||
self._zoph_is_setup(session_browser)
|
||||
yield
|
||||
functional.app_disable(session_browser, self.app_name)
|
||||
|
||||
def _zoph_is_setup(self, session_browser):
|
||||
"""Click setup button on the setup page."""
|
||||
|
||||
Reference in new issue
Block a user