mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
tests: Use class methods for class scoped fixtures
Using class-scoped fixture as instance method is deprecated in pytest 9.1 and support will be removed in 10.0. See: https://docs.pytest.org/en/stable/deprecations.html#class-scoped-fixture-as-instance-method Tests: - Run functional tests for samba, matrixsynapse (unrelated failure), and bepasty. Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
c1aeb1f661
commit
d2a959a277
3 files changed
+9
-6
No files matched your search
@@ -17,7 +17,8 @@ class TestMatrixSynapseApp(functional.BaseAppTests):
|
||||
diagnostics_delay = 1
|
||||
|
||||
@pytest.fixture(scope='class', autouse=True)
|
||||
def fixture_setup(self, session_browser):
|
||||
@classmethod
|
||||
def fixture_setup(cls, session_browser):
|
||||
"""Setup the app."""
|
||||
functional.login(session_browser)
|
||||
functional.domain_add(session_browser, 'mydomain.example')
|
||||
|
||||
@@ -21,7 +21,8 @@ class TestSambaApp(functional.BaseAppTests):
|
||||
has_web = False
|
||||
|
||||
@pytest.fixture(scope='class', autouse=True)
|
||||
def fixture_setup(self, session_browser):
|
||||
@classmethod
|
||||
def fixture_setup(cls, session_browser):
|
||||
"""Setup the app."""
|
||||
functional.login(session_browser)
|
||||
functional.networks_set_firewall_zone(session_browser, 'internal')
|
||||
|
||||
Reference in new issue
Block a user