Skip to content

Add files pattern#253

Merged
lundberg merged 2 commits intomasterfrom
feature/files-pattern
Mar 18, 2024
Merged

Add files pattern#253
lundberg merged 2 commits intomasterfrom
feature/files-pattern

Conversation

@lundberg
Copy link
Copy Markdown
Owner

@lundberg lundberg commented Mar 15, 2024

Add support for matching on file uploads.

Example:

respx.post("https://example.org/", files={"some_file": b"..."})
respx.post("https://example.org/", files={"some_file": ANY})
respx.post("https://example.org/", files={"some_file": ("filename.txt", b"...")})
respx.post("https://example.org/", files={"some_file": ("filename.txt", ANY)})

Fixes #115

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (master@07ae887). Click here to learn what that means.

❗ Current head b66080b differs from pull request most recent head c1a38e8. Consider uploading reports for the commit c1a38e8 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             master      #253   +/-   ##
==========================================
  Coverage          ?   100.00%           
==========================================
  Files             ?        21           
  Lines             ?      2845           
  Branches          ?       428           
==========================================
  Hits              ?      2845           
  Misses            ?         0           
  Partials          ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ziima
Copy link
Copy Markdown

ziima commented Mar 18, 2024

Works for me. Files content types are not checked, but that may be fixed later.

Base automatically changed from fix/form-data-with-files to master March 18, 2024 16:06
@lundberg lundberg force-pushed the feature/files-pattern branch from b66080b to c1a38e8 Compare March 18, 2024 16:13
@lundberg lundberg merged commit 24ee4a9 into master Mar 18, 2024
@lundberg lundberg deleted the feature/files-pattern branch March 18, 2024 16:14
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.

Add a files pattern?

2 participants