Assume I am testing an endpoint that returns the current timestamp and I have code that operates on that timestamp. This code is under test by tavern.
I would like to parametrize the same test to run twice - once against a cached/known timestamp and then live/unknown timestamp.
If the test that runs against the known timestamp passes but fails against the unknown timestamp, I can be sure there wasn't a regression in my code while I was refactoring my code.
The underlying requests call is prepared here:
|
return session.request(**self._request_args) |
requests has a proxy option that can be passed in in the function call.
I would like to pass that proxy option as a parameter from tavern test so that I can run the same test through multiple proxy settings.
Here's a more detailed description of a usecase of service virtualization that requires this kind of parametrization: wrike/pytest-hoverfly#3 (comment)
I see a related issue that exists but that was closed by the OP #530
I also left a comment on another related issue where this usecase of service virtualization wasn't clear: #103
Assume I am testing an endpoint that returns the current timestamp and I have code that operates on that timestamp. This code is under test by tavern.
I would like to parametrize the same test to run twice - once against a cached/known timestamp and then live/unknown timestamp.
If the test that runs against the known timestamp passes but fails against the unknown timestamp, I can be sure there wasn't a regression in my code while I was refactoring my code.
The underlying requests call is prepared here:
tavern/tavern/_plugins/rest/request.py
Line 457 in c1f9da8
requests has a
proxyoption that can be passed in in the function call.I would like to pass that
proxyoption as a parameter from tavern test so that I can run the same test through multiple proxy settings.Here's a more detailed description of a usecase of service virtualization that requires this kind of parametrization: wrike/pytest-hoverfly#3 (comment)
I see a related issue that exists but that was closed by the OP #530
I also left a comment on another related issue where this usecase of service virtualization wasn't clear: #103