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

call pook.off in the end of pook.activate wrapper function #145

Merged
merged 5 commits into from
Oct 15, 2024

Conversation

shift0965
Copy link
Contributor

This PL is for this issue

@sarayourfriend sarayourfriend linked an issue Oct 14, 2024 that may be closed by this pull request
Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

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

Thank you for the issue and PR @shift0965 🙏 Can you add a unit test for this fix? You will also need to update activate_async to fix the same problem for async tests: https://github.com/h2non/pook/blob/master/src/pook/activate_async.py#L26

We'll need a unit test for each as well. If you would like guidance on adding the tests, let me know and I can give some pointers.

@shift0965
Copy link
Contributor Author

Thank you for you feedback! I just added test cases for each scenario and let me know if there are any further adjustments you like me to make.

Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

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

LGTM! One small change needed to get the tests to run (the test function needs to be async), but I'll commit that for you and then CI should pass and I can merge and release today 🙂

Thanks again for the contribution 🎉

tests/unit/api_test.py Outdated Show resolved Hide resolved
tests/unit/api_test.py Outdated Show resolved Hide resolved
tests/unit/api_test.py Outdated Show resolved Hide resolved
@sarayourfriend sarayourfriend merged commit e95e259 into h2non:master Oct 15, 2024
7 checks passed
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.

Flush mocks when pook.activate used as a wrapper
2 participants