mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
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:
parent
6c5fbf6523
commit
71a10bfd31
@ -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'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user