Skip to content

Commit a8f709f

Browse files
author
Review
committed
fix: add await to sync calls in test_share_with_async
1 parent 35542ca commit a8f709f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/actual_tests/files_sharing_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,23 +211,23 @@ async def test_get_inherited_async(anc_any):
211211
@pytest.mark.asyncio(scope="session")
212212
async def test_share_with_async(anc, anc_client):
213213
nc_second_user = Nextcloud(nc_auth_user=environ["TEST_USER_ID"], nc_auth_pass=environ["TEST_USER_PASS"])
214-
assert not nc_second_user.files.sharing.get_list()
214+
assert not await nc_second_user.files.sharing.get_list()
215215
shared_file = await anc.files.by_path("test_empty_text.txt")
216216
folder_share = await anc.files.sharing.create(
217217
"test_empty_dir_in_dir", ShareType.TYPE_USER, share_with=environ["TEST_USER_ID"]
218218
)
219219
file_share = await anc.files.sharing.create(shared_file, ShareType.TYPE_USER, share_with=environ["TEST_USER_ID"])
220220
shares_list1 = await anc.files.sharing.get_list(path="test_empty_dir_in_dir/")
221221
shares_list2 = await anc.files.sharing.get_list(path="test_empty_text.txt")
222-
second_user_shares_list = nc_second_user.files.sharing.get_list()
223-
second_user_shares_list_with_me = nc_second_user.files.sharing.get_list(shared_with_me=True)
222+
second_user_shares_list = await nc_second_user.files.sharing.get_list()
223+
second_user_shares_list_with_me = await nc_second_user.files.sharing.get_list(shared_with_me=True)
224224
await anc.files.sharing.delete(folder_share)
225225
await anc.files.sharing.delete(file_share)
226226
assert not second_user_shares_list
227227
assert len(second_user_shares_list_with_me) == 2
228228
assert len(shares_list1) == 1
229229
assert len(shares_list2) == 1
230-
assert not nc_second_user.files.sharing.get_list()
230+
assert not await nc_second_user.files.sharing.get_list()
231231

232232

233233
@pytest.mark.asyncio(scope="session")

0 commit comments

Comments
 (0)