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

mbeliaev/assert call count #529

Merged

Conversation

beliaev-maksim
Copy link
Collaborator

closes #335

Considering evolved functionality of matchers I do not see it valuable to continue expanding assert_call_count. I believe more preferable will be to inspect Response objects, since they include matchers and all further functionality

`remove` method returns list of removed responses.
Update `add` method on `FirstMatchRegistry` object to do a deepcopy if the same in-memory object is already in the list.
@codecov
Copy link

codecov bot commented Mar 29, 2022

Codecov Report

Merging #529 (9ae149b) into master (9fedd77) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #529   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines         2320      2347   +27     
=========================================
+ Hits          2320      2347   +27     
Impacted Files Coverage Δ
responses/__init__.py 100.00% <100.00%> (ø)
responses/registries.py 100.00% <100.00%> (ø)
responses/tests/test_responses.py 100.00% <100.00%> (ø)
responses/tests/test_matchers.py 100.00% <0.00%> (ø)

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 9fedd77...9ae149b. Read the comment docs.


def delete(self, *args, **kwargs):
self.add(DELETE, *args, **kwargs)
return self.add(DELETE, *args, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

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

Should we be updating the typehint/signature on these methods to include the new return value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@markstory
done

@markstory markstory merged commit bf30737 into getsentry:master Apr 4, 2022
@beliaev-maksim beliaev-maksim deleted the mbeliaev/assert_call_count branch April 4, 2022 20:25
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.

assert_call_count should be able to check urls without matching querystring
2 participants