diff --git a/plinth/modules/openvpn/tests/test_functional.py b/plinth/modules/openvpn/tests/test_functional.py index 31fb2c782..55c279a66 100644 --- a/plinth/modules/openvpn/tests/test_functional.py +++ b/plinth/modules/openvpn/tests/test_functional.py @@ -13,7 +13,7 @@ base_url = functional.config['DEFAULT']['URL'] shortcut_href = '?selected=shortcut-openvpn' -@given('I download openvpn profile') +@given('I download openvpn profile', target_fixture='openvpn_profile') def openvpn_download_profile(session_browser): return _download_profile(session_browser) @@ -31,10 +31,9 @@ def openvpn_app_not_on_front_page(session_browser): @then('the openvpn profile downloaded should be same as before') -def openvpn_profile_download_compare(session_browser, - openvpn_download_profile): +def openvpn_profile_download_compare(session_browser, openvpn_profile): new_profile = _download_profile(session_browser) - assert openvpn_download_profile == new_profile + assert openvpn_profile == new_profile def _download_profile(browser): diff --git a/plinth/modules/snapshot/tests/test_functional.py b/plinth/modules/snapshot/tests/test_functional.py index e036d5772..d1b0dc0be 100644 --- a/plinth/modules/snapshot/tests/test_functional.py +++ b/plinth/modules/snapshot/tests/test_functional.py @@ -18,7 +18,7 @@ def is_snapshots_supported(session_browser): assert True -@given('the list of snapshots is empty') +@given('the list of snapshots is empty', target_fixture='empty_snapshots_list') def empty_snapshots_list(session_browser): _delete_all(session_browser) return _get_count(session_browser) diff --git a/plinth/modules/users/tests/test_functional.py b/plinth/modules/users/tests/test_functional.py index e48bbe8ab..635177735 100644 --- a/plinth/modules/users/tests/test_functional.py +++ b/plinth/modules/users/tests/test_functional.py @@ -58,7 +58,7 @@ def new_user_does_not_exist(session_browser, name): @given(parsers.parse('the user {name:w} exists')) -def test_user_exists(session_browser, name): +def user_exists(session_browser, name): functional.nav_to_module(session_browser, 'users') user_link = session_browser.find_link_by_href( '/plinth/sys/users/{}/edit/'.format(name)) @@ -71,7 +71,7 @@ def test_user_exists(session_browser, name): @given( parsers.parse('the admin user {name:w} with password {password:w} exists')) -def test_admin_user_exists(session_browser, name, password): +def admin_user_exists(session_browser, name, password): functional.nav_to_module(session_browser, 'users') user_link = session_browser.find_link_by_href('/plinth/sys/users/' + name + '/edit/') @@ -82,7 +82,7 @@ def test_admin_user_exists(session_browser, name, password): @given(parsers.parse('the user {name:w} with password {password:w} exists')) -def user_exists(session_browser, name, password): +def user_exists_with_password(session_browser, name, password): functional.nav_to_module(session_browser, 'users') user_link = session_browser.find_link_by_href('/plinth/sys/users/' + name + '/edit/')