6 Jan
2015
6 Jan
'15
3:26 a.m.
On Jan 04, 2015, at 10:21 AM, Andrew Stuart wrote:
What’s the advantage of using VCR over a set of tests that use Kenneth Reitz requests library to send HTTP queries to the API and have a look at the response to see if it contains the expected HTTP codes/data?
The latter approach requires a running MM3 core REST server. The vcr approach only requires that when the core's REST API changes, i.e. in order to generate a new tape.yaml file. The nice thing about vcr is that it integrates with all kinds of HTTP libraries, including httplib2 which is what mailman.client uses, so the test suite just adds a simple context manager to go through vcr when in replay mode.
Cheers, -Barry