kiwicom / pytest-recording

A pytest plugin that allows recording network interactions via VCR.py
MIT License
425 stars 34 forks source link

Feature: Allow block_network.allowed_hosts configuration via fixture #82

Closed AndreCimander closed 2 years ago

AndreCimander commented 2 years ago

Description

Extended pytest_recording.plugin.block_network to allow configuration of allowed_hosts via vcr_config fixture.

I had to version pin werkzeug<2.1.0 to avoid https://github.com/postmanlabs/httpbin/issues/673, not sure if you would like to move this change to a separate PR :)

Checklist

Stranger6667 commented 2 years ago

Yep, looks good to me! A small syntactic issue in the changelog

Re: Werkzeug - I am ok with having this change here :)

Stranger6667 commented 2 years ago

Thanks for bringing this change! :)

AndreCimander commented 2 years ago

Updated the changelog.

((Pycharm`s local history tried to revert your change suggestion :eyes: ))

Stranger6667 commented 2 years ago

Seems like another tox job requires pinning werkzeug

AndreCimander commented 2 years ago

Updated deps for failing tox job, also updated black version in pre-commit-config.yaml to 22.3.0 in order to handle click compatibility.

https://github.com/psf/black/issues/2976

AndreCimander commented 2 years ago

Sorry, was a busy week and time flies...

Updated PR, one test needed a pluggypatch update and there was a lingering black formatting issue in pytest_recording.network that I also included to satisfy the pre-commit hooks.

Stranger6667 commented 2 years ago

Thanks! I'll take a look at codecov integration tomorrow

Stranger6667 commented 2 years ago

Thank you @AndreCimander and sorry for the delay!

AndreCimander commented 2 years ago

@Stranger6667 no worries there, time is flying, thanks for the review and the merge!

Wanted to rewrite the commit messages to satisfy conventional commits, but did not find the time to do it...