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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2024-02-15 10:27:11 -08:00 committed by James Valleroy
parent 6c5fbf6523
commit 71a10bfd31
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -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'