From 71a10bfd31d96c40db9d9c949753ff1cbcc8e6ef Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 15 Feb 2024 10:27:11 -0800 Subject: [PATCH] backups: tests: Don't use pytest marks on fixtures - It removes this warning. plinth/modules/backups/tests/test_ssh_remotes.py:62: PytestRemovedIn9Warning: Marks applied to fixtures have no effect. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/backups/tests/test_ssh_remotes.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plinth/modules/backups/tests/test_ssh_remotes.py b/plinth/modules/backups/tests/test_ssh_remotes.py index 083ec5a47..cae0c2f36 100644 --- a/plinth/modules/backups/tests/test_ssh_remotes.py +++ b/plinth/modules/backups/tests/test_ssh_remotes.py @@ -59,9 +59,8 @@ def fixture_create_temp_user(temp_home, password, needs_root): subprocess.check_call(['sudo', 'userdel', username]) -@pytest.mark.usefixtures('needs_sudo') @pytest.fixture(name='has_ssh_key', scope='module', autouse=True) -def fixture_ssh_key(temp_home, temp_user, password, needs_root): +def fixture_ssh_key(temp_home, temp_user, password, needs_root, needs_sudo): subprocess.check_call([ 'sudo', '-n', '-u', temp_user, 'ssh-keygen', '-t', 'rsa', '-b', '1024', '-N', '', '-f', f'{temp_home}/.ssh/id_rsa', '-q'