Skip to content

Commit

Permalink
fixed tests not to skip (#4)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <[email protected]>
  • Loading branch information
bigcat88 authored Jun 29, 2023
1 parent 551298c commit c36a21c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/apps_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions tests/groups_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions tests/users_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit c36a21c

Please sign in to comment.