]> khamidou — GitHub mirrors - vcrpy.git/log
vcrpy.git
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 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

12 years agoDeleted unnecessary __hash__ method of Request
Max Shytikov [Tue, 29 Apr 2014 21:25:14 +0000 (23:25 +0200)]
Deleted unnecessary __hash__ method of Request

12 years agoUpdated wild fixtures in correspondence with new fixture format
Max Shytikov [Tue, 29 Apr 2014 20:49:50 +0000 (22:49 +0200)]
Updated wild fixtures in correspondence with new fixture format

12 years agoUpdated migration fixtures in correspondence with new fixture format
Max Shytikov [Sat, 26 Apr 2014 20:29:34 +0000 (22:29 +0200)]
Updated migration fixtures in correspondence with new fixture format

12 years agoAdded more test for persist
Max Shytikov [Thu, 24 Apr 2014 00:41:35 +0000 (02:41 +0200)]
Added more test for persist

12 years agoUdated migration test for yaml. replaced strict content comparision
Max Shytikov [Thu, 24 Apr 2014 00:28:30 +0000 (02:28 +0200)]
Udated migration test for yaml. replaced strict content comparision

What we care about it is actually data after loading not the
strict format of yaml file

12 years agoUpdated migration script to use new yaml serialization
Max Shytikov [Thu, 24 Apr 2014 00:18:44 +0000 (02:18 +0200)]
Updated migration script to use new yaml serialization

12 years agoReplaced yaml dump of Request object with plain dict dump
Max Shytikov [Thu, 24 Apr 2014 00:05:14 +0000 (02:05 +0200)]
Replaced yaml dump of Request object with plain dict dump

12 years agoAdded checkfor old cassette on load cassete to persist module
Max Shytikov [Thu, 24 Apr 2014 00:03:56 +0000 (02:03 +0200)]
Added checkfor old cassette on load cassete to persist module

12 years agoFixed crazy/stupid implementation mistakes
Max Shytikov [Wed, 23 Apr 2014 23:10:47 +0000 (01:10 +0200)]
Fixed crazy/stupid implementation mistakes

12 years agoAdded tests for persist module
Max Shytikov [Wed, 23 Apr 2014 21:14:59 +0000 (23:14 +0200)]
Added tests for persist module

12 years agoAdded "New Cassette Format" section to readme
Max Shytikov [Tue, 22 Apr 2014 22:34:20 +0000 (00:34 +0200)]
Added "New Cassette Format" section to readme

12 years agoMake migration python 2.6 compatible
Max Shytikov [Tue, 22 Apr 2014 21:42:12 +0000 (23:42 +0200)]
Make migration python 2.6 compatible

12 years agoFixed open tmp file in python3
Max Shytikov [Tue, 22 Apr 2014 19:32:34 +0000 (21:32 +0200)]
Fixed open tmp file in  python3

12 years agoFixed migration for one file
Max Shytikov [Tue, 22 Apr 2014 01:09:13 +0000 (03:09 +0200)]
Fixed migration for one file

12 years agoAdded migration script for old cassettes
Max Shytikov [Mon, 21 Apr 2014 23:00:02 +0000 (01:00 +0200)]
Added migration script for old cassettes

12 years agoFormatted setup.py to make flake8 happy
Max Shytikov [Mon, 21 Apr 2014 19:46:14 +0000 (21:46 +0200)]
Formatted setup.py to make flake8 happy

12 years agoAdded integration tests for matchers
Max Shytikov [Mon, 14 Apr 2014 21:53:38 +0000 (23:53 +0200)]
Added integration tests for matchers

12 years agoUpdated README
Max Shytikov [Thu, 10 Apr 2014 23:37:17 +0000 (01:37 +0200)]
Updated README

12 years agoAdded 'protocol' to Request for backwards compatibility
Max Shytikov [Thu, 10 Apr 2014 23:35:57 +0000 (01:35 +0200)]
Added 'protocol' to Request for backwards compatibility

12 years agoFixed available matchers declaration
Max Shytikov [Thu, 10 Apr 2014 23:33:30 +0000 (01:33 +0200)]
Fixed available matchers declaration

12 years agoReplaced 'url' mather with 'uri'.
Max Shytikov [Thu, 10 Apr 2014 23:32:10 +0000 (01:32 +0200)]
Replaced 'url' mather with 'uri'.

12 years agoUpdated 'set' to be compatible with 2.6
Max Shytikov [Mon, 7 Apr 2014 00:03:32 +0000 (02:03 +0200)]
Updated 'set' to be compatible with 2.6

12 years agoAdded scheme to default 'match_on'
Max Shytikov [Sun, 6 Apr 2014 23:57:35 +0000 (01:57 +0200)]
Added scheme to default 'match_on'

12 years agoAdded 'scheme' to Request with matcher and test
Max Shytikov [Sun, 6 Apr 2014 23:56:55 +0000 (01:56 +0200)]
Added 'scheme' to Request with matcher and test

12 years agoUpdated default 'match_on'
Max Shytikov [Sun, 6 Apr 2014 23:35:52 +0000 (01:35 +0200)]
Updated default 'match_on'

12 years agoImproved test samples
Max Shytikov [Sun, 6 Apr 2014 23:30:48 +0000 (01:30 +0200)]
Improved test samples

12 years agoAdded query to Request with matcher and test
Max Shytikov [Sun, 6 Apr 2014 23:30:31 +0000 (01:30 +0200)]
Added query to Request with matcher and test

12 years agoAdded path to Request with matcher and test
Max Shytikov [Sun, 6 Apr 2014 23:13:51 +0000 (01:13 +0200)]
Added path to Request with matcher and test

12 years agoAdded port to Request with matcher and test
Max Shytikov [Sun, 6 Apr 2014 23:12:05 +0000 (01:12 +0200)]
Added port to Request with matcher and test

12 years agoAdded test and impl for Request 'host' attribute
Max Shytikov [Sun, 6 Apr 2014 23:08:57 +0000 (01:08 +0200)]
Added test and impl for Request 'host' attribute

12 years agoRefactored unit test for matchers
Max Shytikov [Sun, 6 Apr 2014 22:55:06 +0000 (00:55 +0200)]
Refactored unit test for matchers

12 years agoReplaced Request 'host, port, protocol, path' with 'uri'
Max Shytikov [Sun, 6 Apr 2014 21:49:54 +0000 (23:49 +0200)]
Replaced Request 'host, port, protocol, path' with 'uri'

12 years agoAdded integration test for match on 'url'
Max Shytikov [Tue, 1 Apr 2014 20:59:33 +0000 (22:59 +0200)]
Added integration test for match on 'url'

12 years agoAdded integration test for match on 'method'
Max Shytikov [Tue, 1 Apr 2014 20:44:03 +0000 (22:44 +0200)]
Added integration test for match on 'method'

12 years agoAdded unit test for matcher 'url'
Max Shytikov [Mon, 31 Mar 2014 22:21:01 +0000 (00:21 +0200)]
Added unit test for matcher 'url'

12 years agoAdded unit test for matcher 'method'
Max Shytikov [Mon, 31 Mar 2014 22:11:55 +0000 (00:11 +0200)]
Added unit test for matcher 'method'

12 years agoRemoved 'serializer' from name of test functions
Max Shytikov [Mon, 31 Mar 2014 22:09:24 +0000 (00:09 +0200)]
Removed 'serializer' from name of test functions

Because the name '_serializer_' has no relationships with this tests

12 years agoAdd waffle badge
Kevin McCarthy [Sun, 27 Apr 2014 22:05:19 +0000 (12:05 -1000)]
Add waffle badge

12 years agoFilter Sensitive Data From Requests
Kevin McCarthy [Wed, 23 Apr 2014 07:35:16 +0000 (21:35 -1000)]
Filter Sensitive Data From Requests

Add the ability to filter out sensitive data, using one of three
methods: from headers, from a query string, and by using a custom
callback to modify the request.

Closes #67

12 years agoAdd Logging
Kevin McCarthy [Sun, 27 Apr 2014 21:29:06 +0000 (11:29 -1000)]
Add Logging

This helps to figure out which matcher has decided your two cassettes
differ, and figure out when your cassettes have hit the network.

Closes #34

12 years agoclean up readme whitespace
Kevin McCarthy [Sun, 27 Apr 2014 08:28:38 +0000 (22:28 -1000)]
clean up readme whitespace

12 years agopep8
Kevin McCarthy [Sun, 27 Apr 2014 07:30:43 +0000 (21:30 -1000)]
pep8

12 years agoremove failing test since I'm not going to fix this use case
Kevin McCarthy [Sun, 27 Apr 2014 04:49:01 +0000 (18:49 -1000)]
remove failing test since I'm not going to fix this use case

12 years agoAdd Exception when JSON Serializing Binary Data
Kevin McCarthy [Sun, 27 Apr 2014 00:31:40 +0000 (14:31 -1000)]
Add Exception when JSON Serializing Binary Data

Since I can't think of a good way to deal with this, let's just give a
nice error message to point people in the right direction.

Closes #51

12 years agofix tox envlist
Kevin McCarthy [Thu, 24 Apr 2014 07:03:11 +0000 (21:03 -1000)]
fix tox envlist

12 years agopep8
Kevin McCarthy [Thu, 24 Apr 2014 07:24:12 +0000 (21:24 -1000)]
pep8

12 years agolet's keep testing python3.3, at least for the time being.
Kevin McCarthy [Thu, 24 Apr 2014 05:36:31 +0000 (19:36 -1000)]
let's keep testing python3.3, at least for the time being.

12 years agoimprove socket mocking to hopefully pass both new python3.4 socket connection stuff...
Kevin McCarthy [Thu, 24 Apr 2014 05:30:43 +0000 (19:30 -1000)]
improve socket mocking to hopefully pass both new python3.4 socket connection stuff and requests tests

12 years agobump supported python3 version to 3.4
Kevin McCarthy [Thu, 24 Apr 2014 04:58:17 +0000 (18:58 -1000)]
bump supported python3 version to 3.4

12 years agoMerge pull request #75 from simon-weber/patch-1
Kevin McCarthy [Sat, 12 Apr 2014 07:43:36 +0000 (21:43 -1000)]
Merge pull request #75 from simon-weber/patch-1

fix cassette url field capitalization

12 years agofix cassette url field capitalization
Simon Weber [Fri, 11 Apr 2014 20:43:41 +0000 (16:43 -0400)]
fix cassette url field capitalization

12 years agoMerge pull request #72 from marusich/master
Kevin McCarthy [Sun, 6 Apr 2014 05:40:22 +0000 (19:40 -1000)]
Merge pull request #72 from marusich/master

Add full support for Boto

12 years agoAdd full support for Boto
Chris Marusich [Thu, 3 Apr 2014 18:04:24 +0000 (11:04 -0700)]
Add full support for Boto

Before this change, vcrpy would not work with modules of Boto (e.g., boto.iam)
that use Boto's CertValidatingHTTPSConnection to connect to AWS (unless you
went through the extra effort of disabling certificate validation during the
tests).  This change adds support for those modules.

12 years agoAdd a failing test to illustrate a hole in vcrpy's Boto support
Chris Marusich [Thu, 3 Apr 2014 19:08:41 +0000 (12:08 -0700)]
Add a failing test to illustrate a hole in vcrpy's Boto support

This test will fail with the following error:

TypeError: unbound method __init__() must be called with VCRHTTPConnection
instance as first argument (got CertValidatingHTTPSConnection instance instead)

The TypeError is raised because the __init__ method of Boto's
CertValidatingHTTPSConnection (which extends httplib.HTTPConnection) calls
httplib.HTTPConnection.__init__, and during the test httplib.HTTPConnection
actually refers to the patched verison (i.e., VCRHTTPConnection).  When
VCRHTTPConnection.__init__ is called, it expects to receive a
VCRHTTPConnection object as its first argument, but instead it receives a
CertValidatingHTTPSConnection object.  Because the only ancestor class of
CertValidatingHTTPSConnection is the original, un-patched
httplib.HTTPConnection, the first argument is not considered to be a
VCRHTTPConnection object, so a TypeError is raised.

12 years agobeef up the new epsisodes test a bit
Kevin McCarthy [Sat, 29 Mar 2014 22:07:21 +0000 (12:07 -1000)]
beef up the new epsisodes test a bit

12 years agoRevert "Merge pull request #68 from smallcode/patch-1"
Kevin McCarthy [Sat, 29 Mar 2014 22:03:38 +0000 (12:03 -1000)]
Revert "Merge pull request #68 from smallcode/patch-1"

Never mind, I do seem to have support for this.  I'm not sure
why @smallcode was having issues with it, but I'm going to
beef up the test for it a bit to try to figure out what's broken.

This reverts commit c83134ca39569890e3e0233ce97c47ac40ba754d, reversing
changes made to b7cbd181f461e9e6a0d83c844e50083218dcfe9f.

12 years agoMerge pull request #68 from smallcode/patch-1
Kevin McCarthy [Sat, 22 Mar 2014 05:35:20 +0000 (19:35 -1000)]
Merge pull request #68 from smallcode/patch-1

new_episodes record mode has been unable to use