]> khamidou — GitHub mirrors - vcrpy.git/log
vcrpy.git
12 years agoAdd failing test for session still being attached to cassette after context is gone.
Ivan Malison [Fri, 19 Sep 2014 00:03:13 +0000 (17:03 -0700)]
Add failing test for session still being attached to cassette after context is gone.

12 years agoFixed issue in test_nested_context_managers_with_session_created_before_first_nesting...
Ivan Malison [Fri, 19 Sep 2014 00:01:48 +0000 (17:01 -0700)]
Fixed issue in test_nested_context_managers_with_session_created_before_first_nesting. by using a single class and patching cassette on that class. Not a great solution :\

12 years agoAdd test that fails because of the fact that a new class is used for each cassette...
Ivan Malison [Thu, 18 Sep 2014 23:17:48 +0000 (16:17 -0700)]
Add test that fails because of the fact that a new class is used for each cassette context instead of replacing the cassette on the existing mock connection.

12 years agoUse contextdecorator from contextlib2. add logging for entering context.
Ivan Malison [Thu, 18 Sep 2014 22:25:42 +0000 (15:25 -0700)]
Use contextdecorator from contextlib2. add logging for entering context.

12 years agoRefactor build_patchers into class. Fix issue with patching non existent attribute...
Ivan Malison [Thu, 18 Sep 2014 16:24:28 +0000 (09:24 -0700)]
Refactor build_patchers into class. Fix issue with patching non existent attribute with hasattr.

12 years agohasattr check for requests 2.0 use cassette added type for httplib2 dictionary patch.
Ivan Malison [Thu, 18 Sep 2014 15:02:50 +0000 (08:02 -0700)]
hasattr check for requests 2.0 use cassette added type for httplib2 dictionary patch.

12 years agoCheck for old style class when building subclass.
Ivan Malison [Thu, 18 Sep 2014 13:48:55 +0000 (06:48 -0700)]
Check for old style class when building subclass.

12 years agoPython version agnostic way of getting the next item in the generator.
Ivan Malison [Thu, 18 Sep 2014 12:59:03 +0000 (05:59 -0700)]
Python version agnostic way of getting the next item in the generator.

12 years agoUse mock for patching http connection objects.
Ivan Malison [Thu, 18 Sep 2014 12:32:55 +0000 (05:32 -0700)]
Use mock for patching http connection objects.

12 years agoFailing tests for nested context decoration.
Ivan Malison [Thu, 18 Sep 2014 10:46:39 +0000 (03:46 -0700)]
Failing tests for nested context decoration.

12 years agoChange use_cassette to pass a function to CassetteContextDecorator so that changes...
Ivan Malison [Thu, 18 Sep 2014 09:52:44 +0000 (02:52 -0700)]
Change use_cassette to pass a function to CassetteContextDecorator so that changes to the default settings on the vcr properly propogate.

12 years agouse_cassette -> CassetteContextDecorator
Ivan Malison [Thu, 18 Sep 2014 06:22:43 +0000 (23:22 -0700)]
use_cassette -> CassetteContextDecorator

12 years agoFix failure in test_local_host resulting from attempting to add tuple to list.
Ivan Malison [Thu, 18 Sep 2014 04:48:28 +0000 (21:48 -0700)]
Fix failure in test_local_host resulting from attempting to add tuple to list.

12 years agoRevert "Add global toggle to use_cassette."
Ivan Malison [Thu, 18 Sep 2014 04:42:25 +0000 (21:42 -0700)]
Revert "Add global toggle to use_cassette."

This reverts commit 366e2b75bbba851325e63499c9770ebcf8f3faf7.

Conflicts:
tests/unit/test_cassettes.py

12 years agoChange default paramters to VCR from lists to tuples.
Ivan Malison [Thu, 18 Sep 2014 02:29:02 +0000 (19:29 -0700)]
Change default paramters to VCR from lists to tuples.

12 years agoAdd before_record_response to Cassette and VCR.
Ivan Malison [Wed, 17 Sep 2014 11:10:05 +0000 (04:10 -0700)]
Add before_record_response to Cassette and VCR.

12 years agoAdd global toggle to use_cassette.
Ivan Malison [Wed, 17 Sep 2014 08:28:54 +0000 (01:28 -0700)]
Add global toggle to use_cassette.

12 years agoBump version number for new use_cassette_decorator.
Ivan Malison [Wed, 17 Sep 2014 06:53:50 +0000 (23:53 -0700)]
Bump version number for new use_cassette_decorator.

12 years agoAdd use_cassette class so functinos that are decorated with use_cassette can be calle...
Ivan Malison [Wed, 17 Sep 2014 06:32:28 +0000 (23:32 -0700)]
Add use_cassette class so functinos that are decorated with use_cassette can be called multiple times.

12 years agoMerge pull request #101 from IvanMalison/minor_cleanup
Kevin McCarthy [Tue, 16 Sep 2014 05:10:40 +0000 (19:10 -1000)]
Merge pull request #101 from IvanMalison/minor_cleanup

Clean up __init__.py .

12 years agoClean up __init__.py .
Ivan Malison [Tue, 16 Sep 2014 04:07:20 +0000 (21:07 -0700)]
Clean up __init__.py .

12 years agoMerge pull request #100 from IvanMalison/immutable_keyword_defaults
Kevin McCarthy [Sat, 13 Sep 2014 00:01:55 +0000 (14:01 -1000)]
Merge pull request #100 from IvanMalison/immutable_keyword_defaults

Make defaults of Cassette constructor immutable. Clean up whitespace. Re...

12 years agoMake defaults of Cassette constructor immutable. Clean up whitespace. Remove unused...
Ivan Malison [Fri, 12 Sep 2014 09:16:32 +0000 (02:16 -0700)]
Make defaults of Cassette constructor immutable. Clean up whitespace. Remove unused import.

12 years agoMerge pull request #97 from matt-thomson/multiple-headers
Kevin McCarthy [Sun, 7 Sep 2014 20:06:26 +0000 (10:06 -1000)]
Merge pull request #97 from matt-thomson/multiple-headers

Fix serialization/deserialization of multiple headers with the same value

12 years agoFix multiple header behaviour.
Matt Thomson [Sat, 6 Sep 2014 16:15:15 +0000 (17:15 +0100)]
Fix multiple header behaviour.

Join multiple header values together, rather than losing duplicates with a
dict.

12 years agoDon't write header values multiple times.
Matt Thomson [Sat, 6 Sep 2014 15:57:12 +0000 (16:57 +0100)]
Don't write header values multiple times.

On Python 3, response.msg.keys() contains the same value multiple times if
there are multiple headers with the same value.  Work around this by
converting to a set before iterating over it.

12 years agoAdd test to demonstrate Python 3 multiple headers bug.
Matt Thomson [Sat, 6 Sep 2014 15:32:29 +0000 (16:32 +0100)]
Add test to demonstrate Python 3 multiple headers bug.

12 years agobump version v1.0.3
Kevin McCarthy [Tue, 2 Sep 2014 01:50:25 +0000 (15:50 -1000)]
bump version

12 years agoFix requests stub. Closes #94
Kevin McCarthy [Tue, 2 Sep 2014 01:18:30 +0000 (15:18 -1000)]
Fix requests stub.  Closes #94

12 years agogetheader() in stubs should be case-insensitive
Kevin McCarthy [Sat, 2 Aug 2014 02:25:59 +0000 (16:25 -1000)]
getheader() in stubs should be case-insensitive

12 years agoMerge pull request #87 from hartsock/master
Kevin McCarthy [Fri, 25 Jul 2014 04:10:24 +0000 (18:10 -1000)]
Merge pull request #87 from hartsock/master

Python 3: print_function

12 years agoPython 3: print_function
Shawn Hartsock [Thu, 24 Jul 2014 20:33:47 +0000 (16:33 -0400)]
Python 3: print_function

Use print function if you must print, this lets us use the
library in python 3 environments.

partial: https://github.com/kevin1024/vcrpy/issues/86

12 years agoRemove extra colon in README
Kevin McCarthy [Tue, 8 Jul 2014 02:02:29 +0000 (16:02 -1000)]
Remove extra colon in README

Closes #82

12 years agobump version v1.0.2
Kevin McCarthy [Sat, 17 May 2014 23:09:10 +0000 (13:09 -1000)]
bump version

12 years agorequests 2.3 compat
Kevin McCarthy [Sat, 17 May 2014 22:51:47 +0000 (12:51 -1000)]
requests 2.3 compat

12 years agoVersion bump to 1.0.1 v1.0.1
Kevin McCarthy [Sat, 17 May 2014 19:44:02 +0000 (09:44 -1000)]
Version bump to 1.0.1

12 years agoIgnore requests before trying to play them
Kevin McCarthy [Tue, 13 May 2014 07:55:59 +0000 (21:55 -1000)]
Ignore requests before trying to play them

Closes #79

12 years agoUpdate README.md
Kevin McCarthy [Mon, 12 May 2014 19:22:09 +0000 (09:22 -1000)]
Update README.md

12 years agobump version v1.0.0
Kevin McCarthy [Sat, 10 May 2014 22:01:19 +0000 (12:01 -1000)]
bump version

12 years agoMerge pull request #78 from mshytikov/feature/cassette-all-played
Kevin McCarthy [Sat, 10 May 2014 21:58:28 +0000 (11:58 -1000)]
Merge pull request #78 from mshytikov/feature/cassette-all-played

Feature/Cassette#all_played

12 years agopep8
Kevin McCarthy [Sat, 10 May 2014 21:51:35 +0000 (11:51 -1000)]
pep8

12 years agogotta think of the future
Kevin McCarthy [Sat, 10 May 2014 21:36:03 +0000 (11:36 -1000)]
gotta think of the future

12 years agoadd note about hack
Kevin McCarthy [Sat, 10 May 2014 21:35:09 +0000 (11:35 -1000)]
add note about hack

12 years agomore migration replacement strings
Kevin McCarthy [Sat, 10 May 2014 21:26:58 +0000 (11:26 -1000)]
more migration replacement strings

12 years agoforgot to check in tests
Kevin McCarthy [Sat, 10 May 2014 21:22:06 +0000 (11:22 -1000)]
forgot to check in tests

12 years agocheck for old cassette version
Kevin McCarthy [Sat, 10 May 2014 21:15:36 +0000 (11:15 -1000)]
check for old cassette version

12 years agostring replace frozenset
Kevin McCarthy [Sat, 10 May 2014 21:06:18 +0000 (11:06 -1000)]
string replace frozenset

12 years agorefactor migration script to reuse code
Kevin McCarthy [Sat, 10 May 2014 21:02:14 +0000 (11:02 -1000)]
refactor migration script to reuse code

12 years agoremove pdb
Kevin McCarthy [Sat, 10 May 2014 20:08:21 +0000 (10:08 -1000)]
remove pdb

12 years agofix serialization problem
Kevin McCarthy [Sat, 10 May 2014 19:59:48 +0000 (09:59 -1000)]
fix serialization problem

12 years agoheaders dont retain order anymore.... sigh
Kevin McCarthy [Thu, 8 May 2014 04:31:55 +0000 (18:31 -1000)]
headers dont retain order anymore.... sigh

12 years agoJust make all the headers lower for now
Kevin McCarthy [Wed, 7 May 2014 06:37:40 +0000 (20:37 -1000)]
Just make all the headers lower for now

12 years agoencoooode
Kevin McCarthy [Wed, 7 May 2014 06:27:54 +0000 (20:27 -1000)]
encoooode

12 years agonot really very happy about this
Kevin McCarthy [Wed, 7 May 2014 06:16:56 +0000 (20:16 -1000)]
not really very happy about this

12 years agoflickr test was actually using yaml cassettes
Kevin McCarthy [Wed, 7 May 2014 05:49:14 +0000 (19:49 -1000)]
flickr test was actually using yaml cassettes

12 years agoupdate old cassette detection
Kevin McCarthy [Wed, 7 May 2014 05:37:46 +0000 (19:37 -1000)]
update old cassette detection

12 years agoupdate serializers
Kevin McCarthy [Wed, 7 May 2014 05:20:42 +0000 (19:20 -1000)]
update serializers

12 years agofix a couple imports for py3
Kevin McCarthy [Wed, 7 May 2014 05:03:33 +0000 (19:03 -1000)]
fix a couple imports for py3

12 years agoMake Serializers Dumber
Kevin McCarthy [Wed, 7 May 2014 04:48:29 +0000 (18:48 -1000)]
Make Serializers Dumber

Let's have the serializer just worry about serializing the dict
that we hand it, and move the unicode stuff up to a serialize module.

This should hopefully let us move toward using a version string in
cassettes.

12 years agofix python3 compat
Kevin McCarthy [Mon, 5 May 2014 04:21:55 +0000 (18:21 -1000)]
fix python3 compat

12 years agofix migration script
Kevin McCarthy [Mon, 5 May 2014 03:35:45 +0000 (17:35 -1000)]
fix migration script

12 years agoremove some unused serialization code
Kevin McCarthy [Sun, 4 May 2014 06:48:09 +0000 (20:48 -1000)]
remove some unused serialization code

12 years agoupdate wild cassette to match new format
Kevin McCarthy [Sun, 4 May 2014 06:43:27 +0000 (20:43 -1000)]
update wild cassette to match new format

12 years agofix python3 compat
Kevin McCarthy [Sun, 4 May 2014 06:37:53 +0000 (20:37 -1000)]
fix python3 compat

12 years agoupdate migration fixtures
Kevin McCarthy [Sun, 4 May 2014 05:56:15 +0000 (19:56 -1000)]
update migration fixtures

12 years agochange response format
Kevin McCarthy [Sun, 4 May 2014 05:54:00 +0000 (19:54 -1000)]
change response format

12 years agolets try response headers as dicts
Kevin McCarthy [Sun, 4 May 2014 04:35:24 +0000 (18:35 -1000)]
lets try response headers as dicts

12 years agoUpdate copyright date
Kevin McCarthy [Thu, 8 May 2014 02:28:26 +0000 (16:28 -1000)]
Update copyright date

12 years agoUpdate README.md
Kevin McCarthy [Tue, 6 May 2014 04:40:56 +0000 (18:40 -1000)]
Update README.md

12 years agoAdded implementation for Cassette#all_payed
Max Shytikov [Mon, 5 May 2014 22:46:43 +0000 (00:46 +0200)]
Added implementation for Cassette#all_payed

12 years agopep8
Max Shytikov [Mon, 5 May 2014 22:46:32 +0000 (00:46 +0200)]
pep8

12 years agoAdded tests for Cassette#all_played
Max Shytikov [Mon, 5 May 2014 22:46:03 +0000 (00:46 +0200)]
Added tests for Cassette#all_played

12 years agoAdded README for new 'all_played' property of Cassette
Max Shytikov [Mon, 5 May 2014 22:45:10 +0000 (00:45 +0200)]
Added README for new 'all_played' property of Cassette

12 years agoSerialize dict of lists, use dicts internally
Kevin McCarthy [Sun, 4 May 2014 03:32:49 +0000 (17:32 -1000)]
Serialize dict of lists, use dicts internally

There is a weird quirk in HTTP.  You can send the same header twice.
For this reason, headers are represented by a dict, with lists as the
values.  However, it appears that HTTPlib is completely incapable of
sending the same header twice.  This puts me in a weird position: I want
to be able to accurately represent HTTP headers in cassettes, but I
don't want the extra step of always having to do [0] in the general
case, i.e.  request.headers['key'][0]

In addition, some servers sometimes send the same header more than once,
and httplib *can* deal with this situation.

Futhermore, I wanted to keep the request and response cassette format as
similar as possible.

For this reason, in cassettes I keep a dict with lists as keys, but once
deserialized into VCR, I keep them as plain, naked dicts.

12 years agoinstall pytest-localserver on travis
Kevin McCarthy [Sun, 4 May 2014 01:53:20 +0000 (15:53 -1000)]
install pytest-localserver on travis

12 years agooops, forgot to commit new tests for ignore feature
Kevin McCarthy [Sun, 4 May 2014 01:52:45 +0000 (15:52 -1000)]
oops, forgot to commit new tests for ignore feature

12 years agoNew Feature: Ignore Some Requests
Kevin McCarthy [Sun, 4 May 2014 00:46:39 +0000 (14:46 -1000)]
New Feature: Ignore Some Requests

Add 2 new options, ignore_localhost and ignore_hosts, which can ignore
requests so they aren't recorded in a cassette.

Closes #74

12 years agoupdate README
Kevin McCarthy [Sun, 4 May 2014 01:20:21 +0000 (15:20 -1000)]
update README

12 years agoMerge pull request #73 from mshytikov/feature/new-matchers
Kevin McCarthy [Sun, 4 May 2014 01:11:02 +0000 (15:11 -1000)]
Merge pull request #73 from mshytikov/feature/new-matchers

Feature/new matchers

12 years agoAdded test casses and refactored test for Request#port
Max Shytikov [Sun, 4 May 2014 00:20:46 +0000 (02:20 +0200)]
Added test casses and refactored test for Request#port

12 years agopep8
Max Shytikov [Sun, 4 May 2014 00:10:19 +0000 (02:10 +0200)]
pep8

12 years agoUpdated Request with stup to support default ports
Max Shytikov [Sun, 4 May 2014 00:06:21 +0000 (02:06 +0200)]
Updated Request with stup to support default ports

12 years agoUpdated migration to support default ports
Max Shytikov [Sun, 4 May 2014 00:05:55 +0000 (02:05 +0200)]
Updated migration to support default ports

12 years agoRenamed outdated url to uri.
Max Shytikov [Sat, 3 May 2014 22:01:30 +0000 (00:01 +0200)]
Renamed outdated url to uri.

12 years agoRemoved default '80' port of uri in tests
Max Shytikov [Sat, 3 May 2014 20:32:27 +0000 (22:32 +0200)]
Removed default '80' port of uri in tests

12 years agoAdded tetst for uri and port of Request
Max Shytikov [Sat, 3 May 2014 20:31:30 +0000 (22:31 +0200)]
Added tetst for uri and port of Request

12 years agoFixed typo
Max Shytikov [Wed, 30 Apr 2014 21:32:15 +0000 (23:32 +0200)]
Fixed typo

12 years agoRemoved accidental print call
Max Shytikov [Wed, 30 Apr 2014 02:20:27 +0000 (04:20 +0200)]
Removed accidental print call

12 years agoUpdate _remove_headers to work with headers copy
Max Shytikov [Wed, 30 Apr 2014 02:06:14 +0000 (04:06 +0200)]
Update _remove_headers to work with headers copy

Because of the filter implementation here we nedd to work only
with clone of the headers and request. subj to refactor

12 years agoUpdated test to use new headers structure
Max Shytikov [Wed, 30 Apr 2014 02:05:27 +0000 (04:05 +0200)]
Updated test to use new headers structure

12 years agoUpdated test for filters. Mock replaced with real Request object
Max Shytikov [Wed, 30 Apr 2014 01:48:29 +0000 (03:48 +0200)]
Updated test for filters. Mock replaced with real Request object

12 years agoUpdated _remove_query_parameters to use latest Request Api
Max Shytikov [Wed, 30 Apr 2014 01:29:09 +0000 (03:29 +0200)]
Updated _remove_query_parameters to use latest Request Api

12 years agoFixed name of the variable
Max Shytikov [Wed, 30 Apr 2014 01:04:54 +0000 (03:04 +0200)]
Fixed name of the variable

12 years agoUpdated _remove_headers to use latest Headers structure
Max Shytikov [Wed, 30 Apr 2014 01:02:24 +0000 (03:02 +0200)]
Updated _remove_headers to use latest Headers structure

Probably we need API in Request object like 'remove_header'

12 years agoUpdated test to use new Request constructor
Max Shytikov [Wed, 30 Apr 2014 00:49:55 +0000 (02:49 +0200)]
Updated test to use new Request constructor

12 years agopep8
Max Shytikov [Wed, 30 Apr 2014 00:41:21 +0000 (02:41 +0200)]
pep8

12 years agoMake code 2.6 compatible
Max Shytikov [Wed, 30 Apr 2014 00:14:34 +0000 (02:14 +0200)]
Make code 2.6 compatible

12 years agoAdded migration for Request headers to be a dict of lists
Max Shytikov [Tue, 29 Apr 2014 23:43:47 +0000 (01:43 +0200)]
Added migration for Request headers to be a dict of lists

12 years agoMake Request headers to be a dict of lists
Max Shytikov [Tue, 29 Apr 2014 23:18:12 +0000 (01:18 +0200)]
Make Request headers to be a dict of lists

12 years agoRemoved frozenset
Max Shytikov [Tue, 29 Apr 2014 21:59:25 +0000 (23:59 +0200)]
Removed frozenset