From c36a21c0ab38e0c8d244766e040b019451a8ff27 Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Thu, 29 Jun 2023 19:13:17 +0300 Subject: [PATCH] fixed tests not to skip (#4) Signed-off-by: Alexander Piskun --- tests/apps_test.py | 2 +- tests/groups_test.py | 6 +++--- tests/users_test.py | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/apps_test.py b/tests/apps_test.py index 4cdb7105..dc2db849 100644 --- a/tests/apps_test.py +++ b/tests/apps_test.py @@ -21,7 +21,7 @@ def test_list_apps(nc): assert APP_NAME in apps -@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1], Nextcloud), reason="Not available for NextcloudApp.") +@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1][0], Nextcloud), reason="Not available for NextcloudApp.") @pytest.mark.parametrize("nc", NC_TO_TEST[:1]) def test_enable_disable_app(nc): assert nc.apps.is_installed(APP_NAME) diff --git a/tests/groups_test.py b/tests/groups_test.py index b6ae67a5..c4bcade4 100644 --- a/tests/groups_test.py +++ b/tests/groups_test.py @@ -7,7 +7,7 @@ TEST_GROUP_NAME = "test_coverage_group" -@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1], Nextcloud), reason="Not available for NextcloudApp.") +@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1][0], Nextcloud), reason="Not available for NextcloudApp.") @pytest.mark.parametrize("nc", NC_TO_TEST[:1]) def test_create_delete_group(nc): try: @@ -22,7 +22,7 @@ def test_create_delete_group(nc): nc.users_groups.delete(TEST_GROUP_NAME) -@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1], Nextcloud), reason="Not available for NextcloudApp.") +@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1][0], Nextcloud), reason="Not available for NextcloudApp.") @pytest.mark.parametrize("nc", NC_TO_TEST[:1]) def test_list_group(nc): try: @@ -46,7 +46,7 @@ def test_list_group(nc): nc.users_groups.delete(TEST_GROUP_NAME + "2") -@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1], Nextcloud), reason="Not available for NextcloudApp.") +@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1][0], Nextcloud), reason="Not available for NextcloudApp.") @pytest.mark.parametrize("nc", NC_TO_TEST[:1]) def test_group_members_promote_demote(nc): try: diff --git a/tests/users_test.py b/tests/users_test.py index b2115c6c..edc802dd 100644 --- a/tests/users_test.py +++ b/tests/users_test.py @@ -21,7 +21,7 @@ def test_get_user_404(nc): nc.users.get("non existing user") -@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1], Nextcloud), reason="Not available for NextcloudApp.") +@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1][0], Nextcloud), reason="Not available for NextcloudApp.") @pytest.mark.parametrize("nc", NC_TO_TEST[:1]) def test_create_user(nc): try: @@ -33,7 +33,7 @@ def test_create_user(nc): nc.users.create(TEST_USER_NAME, password=TEST_USER_PASSWORD) -@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1], Nextcloud), reason="Not available for NextcloudApp.") +@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1][0], Nextcloud), reason="Not available for NextcloudApp.") @pytest.mark.parametrize("nc", NC_TO_TEST[:1]) def test_delete_user(nc): try: @@ -45,7 +45,7 @@ def test_delete_user(nc): nc.users.delete(TEST_USER_NAME) -@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1], Nextcloud), reason="Not available for NextcloudApp.") +@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1][0], Nextcloud), reason="Not available for NextcloudApp.") @pytest.mark.parametrize("nc", NC_TO_TEST[:1]) def test_list_users(nc): try: @@ -62,7 +62,7 @@ def test_list_users(nc): nc.users.delete(TEST_USER_NAME) -@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1], Nextcloud), reason="Not available for NextcloudApp.") +@pytest.mark.skipif(not isinstance(NC_TO_TEST[:1][0], Nextcloud), reason="Not available for NextcloudApp.") @pytest.mark.parametrize("nc", NC_TO_TEST[:1]) def test_enable_disable_user(nc): try: