Merge pull request #1662 from YunoHost/fix-options-tests

tests:options: fix missing patching data
This commit is contained in:
Alexandre Aubin 2023-05-18 12:57:52 +02:00 committed by GitHub
commit 06826b4fc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1544,6 +1544,10 @@ class TestDomain(BaseTest):
]
# fmt: on
def test_options_prompted_with_ask_help(self, prefill_data=None):
with patch_domains(domains=[main_domain], main_domain=main_domain):
super().test_options_prompted_with_ask_help(prefill_data=prefill_data)
def test_scenarios(self, intake, expected_output, raw_option, data):
with patch_domains(**data):
super().test_scenarios(intake, expected_output, raw_option, data)
@ -1751,6 +1755,15 @@ class TestUser(BaseTest):
]
# fmt: on
@pytest.mark.usefixtures("patch_no_tty")
def test_basic_attrs(self):
with patch_users(
users={admin_username: admin_user},
admin_username=admin_username,
main_domain=main_domain,
):
self._test_basic_attrs()
def test_options_prompted_with_ask_help(self, prefill_data=None):
with patch_users(
users={admin_username: admin_user, regular_username: regular_user},