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

add matcher for request headers #407

Merged
merged 2 commits into from
Oct 22, 2021
Merged

Conversation

eviltwin
Copy link
Contributor

I needed a matcher for request headers and so I built one that I felt was generic enough to warrant inclusion upstream.

Hopefully the detail that I've added to the README.rst is enough to understand the motivation for how I built it, so I'll avoid repeating myself here.

I'm happy to discuss any changes that you might like in order to have this merged.

Copy link
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

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

Nice work. I only had one small suggestion.

responses/matchers.py Outdated Show resolved Hide resolved
@eviltwin
Copy link
Contributor Author

Looks like I messed up on the python 2.7 messages - I'll be honest and admit that I typed them manually and didn't bother checking they were right... I'll update them along with the changes requested this evening.

@codecov
Copy link

codecov bot commented Sep 20, 2021

Codecov Report

Merging #407 (fa35c2f) into master (374e605) will increase coverage by 2.17%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #407      +/-   ##
==========================================
+ Coverage   95.59%   97.76%   +2.17%     
==========================================
  Files           4        4              
  Lines        1568     1704     +136     
==========================================
+ Hits         1499     1666     +167     
+ Misses         69       38      -31     
Impacted Files Coverage Δ
responses/matchers.py 100.00% <100.00%> (+3.79%) ⬆️
responses/test_responses.py 99.12% <100.00%> (+0.59%) ⬆️
responses/__init__.py 98.23% <0.00%> (+5.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 374e605...fa35c2f. Read the comment docs.

@markstory
Copy link
Member

Looks like there are a few conflicts with one of the other recently merged pull requests. Sorry about that.

@beliaev-maksim
Copy link
Collaborator

@eviltwin
just to give you background. I aligned messages for Python 2 and 3 in #403.
Also, reason from matchers propagates now directly to responses without modification

please update the PR according to the logic, you can find implementation details in HEAD of the master

@eviltwin
Copy link
Contributor Author

Damn, that's what I get for sitting on this for four weeks I guess :)

I'll take a look now :)

responses/matchers.py Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
@eviltwin
Copy link
Contributor Author

thanks to both @beliaev-maksim and @markstory for your input 🙂

I've rebased this against master, changed the param name and squashed things together to tidy up the history. Hopefully it now incorporates everything discussed 👍

@beliaev-maksim
Copy link
Collaborator

code implementation looks good to me

@wilcoschoneveld
Copy link

@eviltwin awesome! thanks for this PR!

@markstory can this be merged?

@markstory markstory merged commit fd388c1 into getsentry:master Oct 22, 2021
@markstory
Copy link
Member

Thank you 👍

markstory added a commit that referenced this pull request Oct 22, 2021
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.

4 participants