1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00
Commit Graph

48 Commits

Author SHA1 Message Date
Josh Peak
4a8e80ee3e v4.0.x - Remove legacy python and add python3.8 support (#499)
* Drop support for legacy Python 2.7

* Upgrade Python syntax with pyupgrade --py3-plus

* Trim testing matrix to remove python2

* re-enable python3.8 in travis as tests that are not allowed to fail

* Remove some six

* The future is now

* Remove Python 2 imports

* Add back example, but change py27 to py36

* Remove redundant compat.py

* Blacken

* Credit hugovk in changelog

WIP Updating Sphinx Docs and AutoDoc

* Fix AutoDoc and update Sphinx theme to python_doc_theme

* Fix #420, autodoc even undocumented (docstring-less) method signatures

* Doc theme 'nature'. Add global TOC to doc sidebar

* Comment last reference to package six

* Changelog is now a consistent format

* Yet another documentation fix for links and title hierarchy

* Start work on new SVG logo

test SVG in README

trying to test new SVG logo in README

Apply centering

Apply readme logo centering

Trying to align image

Trying random shit

trying align right

add emoji

Large logo has higher priority

Change title hierarchy

Actually use a H1

Try again

try and organise badges

revert link back to point at master

* updated new take on VCR logo as SVG code

* Testing modern logo in docs

* Add sanitize for rendering SVG

* Switch to alabaster theme

* Update vcrpy logo (#503)

* Add credit for V4 logo changes.

* Add rewind and play animation

* Add svg into ReadTheDocs static assets so that it can be hosted so the animations work.

* Need to embedd the SVG for ReadTheDocs somewhere so I can get the link to later embed in the README

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Sean Bailey <sean@seanbailey.io>
2019-12-20 11:45:07 +11:00
Josh Peak
7caf29735a Format project with black (#467)
Format with line length 110 to match flake8

make black part of linting check

Update travis spec for updated black requirements

Add diff output for black on failure

update changelog
2019-08-24 11:36:35 +10:00
Arthur Hamon
396c4354e8 add cassette's method to find the most similar request(s) of a request
This method get the requests in the cassettes with the most matchers that succeeds.
2019-06-27 22:22:10 +02:00
Karim Hamidou
472bc3aea1 Add a rewind method to reset a cassette. 2018-12-20 12:44:07 +01:00
Julien Funk
6887e2cff9 remove unused imports 2017-01-15 15:04:20 -08:00
Ivan Malison
06b00837fc Fix patch of FliesystemPersister.load_cassette 2017-01-13 15:29:45 -08:00
Julien Funk
a033bc729c refactored, 1 failing test 2017-01-13 16:09:42 -05:00
Jayson Reis
632af2e41a Fix/ignore some flake errors 2016-01-20 12:28:46 +01:00
John Vandenberg
dc9cd4229b Fix pyflakes and pep8 errors
Use extra asserts to use previously unused variables in tests,
such as `cass` and `response`.

Fix only pyflakes errors in docs/conf.py
2015-11-26 08:25:06 +11:00
Aron Griffis
0eda8ba482 Default path_transformer=None. Fixes #199 2015-08-28 07:25:03 -04:00
Ivan Malison
89cdda86d1 fix generator test. 2015-07-30 14:22:16 -07:00
Ivan Malison
a234ad6b12 Fix all the tests in python 3 2015-07-30 03:39:04 -07:00
Ivan Malison
21c176ee1e Make cassette active for duration of coroutine/generator
Closes #177.
2015-07-30 01:47:29 -07:00
Thomas Grainger
41949f7dc6 use conditional requirements for backport libraries Fixes #147 2015-07-02 09:34:27 +01:00
Ivan Malison
2323b9da5f Automatically generate cassette names from function names. Add
`path_transformer` and `func_path_generator`. Closes #151.
2015-05-10 03:22:43 -07:00
Ivan Malison
0bbbc694b0 Make CassetteContextDecorator decorator produce reentrant functions.
Closes #150.
2015-05-09 23:14:00 -07:00
Ivan Malison
881138cb8d inject_cassette fallout. 2015-04-01 17:46:35 -07:00
Ivan Malison
c0a22df7ed Add ability to add custom patches to vcr and cassettes. 2015-01-08 10:54:27 -08:00
Ivan Malison
958aac3af3 Use mock for patching http connection objects. 2014-09-18 05:32:55 -07:00
Ivan Malison
9a564586a4 Failing tests for nested context decoration. 2014-09-18 03:46:39 -07:00
Ivan Malison
643a4c91ee Change use_cassette to pass a function to CassetteContextDecorator so that changes to the default settings on the vcr properly propogate. 2014-09-18 02:52:44 -07:00
Ivan Malison
472cc3bffe use_cassette -> CassetteContextDecorator 2014-09-17 23:22:43 -07:00
Ivan Malison
a08c90c5d6 Revert "Add global toggle to use_cassette."
This reverts commit 366e2b75bb.

Conflicts:
	tests/unit/test_cassettes.py
2014-09-17 21:42:25 -07:00
Ivan Malison
9a4f5f23a4 Add before_record_response to Cassette and VCR. 2014-09-17 04:10:05 -07:00
Ivan Malison
366e2b75bb Add global toggle to use_cassette. 2014-09-17 01:28:54 -07:00
Ivan Malison
cb05f4163c Add use_cassette class so functinos that are decorated with use_cassette can be called multiple times. 2014-09-16 23:45:05 -07:00
Kevin McCarthy
3b05d499c3 Merge pull request #78 from mshytikov/feature/cassette-all-played
Feature/Cassette#all_played
2014-05-10 11:58:28 -10:00
Kevin McCarthy
66c6909021 not really very happy about this 2014-05-10 11:52:35 -10:00
Max Shytikov
bd2121d34e pep8 2014-05-06 00:46:32 +02:00
Max Shytikov
f9f2b98427 Added tests for Cassette#all_played 2014-05-06 00:46:03 +02:00
Max Shytikov
1e995c3c9b Replaced yaml dump of Request object with plain dict dump 2014-04-30 02:36:26 +02:00
Kevin McCarthy
d4494bae50 Let's have the new exceptions subclass basic exception types 2013-12-19 19:43:32 -10:00
Marc Abramowitz
a6806f2f99 Nicer error when cassette doesn't contain request
Raise UnhandledHTTPRequestError.
Show name of cassette and request.
2013-12-19 15:41:04 -08:00
Kevin McCarthy
188b57a2fa Fix API by adding 'responses_of' method
`responses_of` replaces `response_of`, since each request can have
several matching responses now.

This breaks backwards compatibility if you are using the
response_of method, so a version bump will be required.
2013-12-01 14:26:35 -10:00
Kevin McCarthy
89403c255c Record Multiple Matching Requests
This change allows us to record multiple matching requests to
the same URL, and then play them back sequentially.

Closes #40, #41
2013-11-10 12:17:39 -10:00
Kevin McCarthy
deed8cab97 Fix issue #36 - error message for unregistered matcher was broken 2013-09-29 15:56:50 -10:00
Kevin McCarthy
a66f462dcd Add support for custom request matchers
This commit not only changes the default method of matching requests
(just match on method and URI instead of the entire request + headers)
but also allows the user to add custom matchers.
2013-09-16 20:46:00 -10:00
Kevin McCarthy
c8299103fb pep8 fixes 2013-08-23 20:35:43 -10:00
Kevin McCarthy
a50cebaf21 change response to response_of 2013-08-11 15:05:41 -10:00
Kevin McCarthy
4f0668471e Refactor again to try to give Cassette a cleaner interface 2013-08-11 15:05:41 -10:00
Kevin McCarthy
ac2f21b318 remove extra whitespace 2013-08-11 15:05:41 -10:00
Kevin McCarthy
e39b48e73b add a couple more tests, change played api to require request being played 2013-08-11 15:05:41 -10:00
Kevin McCarthy
4cdf5f7483 update cassette unit tests 2013-08-11 15:05:41 -10:00
Kevin McCarthy
166facd0d0 check that cassette contains things before returning 2013-08-11 15:05:40 -10:00
Kevin McCarthy
fb2aa89445 replace cached() with mark_played / play_count 2013-08-11 15:05:40 -10:00
Kevin McCarthy
4fe6f463c3 remove fixtures, remove some dead httpbin assert code 2013-08-11 15:05:40 -10:00
Kevin McCarthy
5f512ca6b2 add unit tests for Cassette implementation 2013-08-11 15:05:39 -10:00
Kevin McCarthy
cbedb5818a add unit tests 2013-08-11 15:05:39 -10:00