Skip to content

Commit

Permalink
[SPO] Fix unreachable assertions in drive items delta test (#1260)
Browse files Browse the repository at this point in the history
  • Loading branch information
timgrein authored Jul 13, 2023
1 parent 41f6722 commit fd63a89
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions tests/sources/test_sharepoint_online.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,14 +799,18 @@ async def test_drive_items_delta(self, client, patch_fetch, patch_scroll_delta_u
]
)

returned_items = []
async for item in client.drive_items_delta(delta_url_input):
returned_items.append(item)

return returned_items
returned_drive_items_pages = []
async for page in client.drive_items_delta(delta_url_input):
returned_drive_items_pages.append(page)

returned_drive_items = [
item
for drive_item_page in returned_drive_items_pages
for item in drive_item_page
]

assert len(returned_items) == len(items_page_1) + len(items_page_2)
assert returned_items == items_page_1 + items_page_2
assert len(returned_drive_items) == len(items_page_1) + len(items_page_2)
assert returned_drive_items == items_page_1 + items_page_2

@pytest.mark.asyncio
async def test_drive_items(self, client, patch_fetch):
Expand Down

0 comments on commit fd63a89

Please sign in to comment.