Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDO-157 Added loop to get all resources using streaming #351

Closed
wants to merge 15 commits into from

Conversation

Tushar11Varshney
Copy link
Contributor

No description provided.

@Tushar11Varshney
Copy link
Contributor Author

retrigger checks

results = [result async for result in async_gen]
assert len(results) == 2
assert results[0]["resources"][0] == '{"resourceType": "Patient", "id": "1"}'
assert results[0]["errors"] == []

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no assertion for index 1 which was happening before.

@@ -194,7 +197,7 @@ async def test_get_batch_result_streaming_async_multiple_results() -> None:
results.append(result)

# Assert the results
assert len(results) == 1
assert len(results) == 2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only comparing 1 item

@@ -645,7 +646,7 @@ async def get_batch_results_paging_async(
server_page_number += 1
resources = resources + result_response
page_number += 1
if limit and 0 < limit <= len(resources):
if limit and 0 < limit < len(resources):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants