Skip to content
Snippets Groups Projects

Use httpx for download example uploads

Merged Ahmed Ilyas requested to merge increase-test-workers into develop

Using requests with streaming leads to test errors sometimes depending on the fixture setup. This leads to an httpx client being used in test, which doesn't support stream = true. Streaming downloads is supported using httpx.stream function instead.

FAILED tests/config/models/test_plugins.py::test_example_upload_entry_point_valid[load with url] - TypeError: TestClient.get() got an unexpected keyword argument 'stream'
FAILED tests/config/models/test_plugins.py::test_example_upload_entry_point_invalid[cannot find url] - AssertionError: Regex pattern did not match.
 Regex: 'Could not fetch the example upload from URL: https://test.zip'
 Input: "TestClient.get() got an unexpected keyword argument 'stream'"
= 2 failed, 598 passed, 8 skipped, 2888 deselected, 51 warnings in 561.98s (0:09:21) 

This MR moves the download function to use httpx to avoid this discrepancy.

Edited by Ahmed Ilyas

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading