Kevin McCarthy
f479f205ad
Update copyright date
2014-05-07 16:28:26 -10:00
Kevin McCarthy
c72d19175f
Update README.md
2014-05-05 18:40:56 -10:00
Kevin McCarthy
5e295e0603
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.
2014-05-03 17:39:12 -10:00
Kevin McCarthy
2ef5f9208a
install pytest-localserver on travis
2014-05-03 15:53:20 -10:00
Kevin McCarthy
0be7d6f238
oops, forgot to commit new tests for ignore feature
2014-05-03 15:52:45 -10:00
Kevin McCarthy
3990b32892
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
2014-05-03 15:25:31 -10:00
Kevin McCarthy
b5cfd517cf
update README
2014-05-03 15:21:05 -10:00
Kevin McCarthy
adf127c073
Merge pull request #73 from mshytikov/feature/new-matchers
...
Feature/new matchers
2014-05-03 15:11:02 -10:00
Max Shytikov
78f6ce46b5
Added test casses and refactored test for Request#port
2014-05-04 02:20:46 +02:00
Max Shytikov
ce5d2225a6
pep8
2014-05-04 02:12:48 +02:00
Max Shytikov
3322234b25
Updated Request with stup to support default ports
2014-05-04 02:12:38 +02:00
Max Shytikov
5d10a38160
Updated migration to support default ports
2014-05-04 02:11:49 +02:00
Max Shytikov
0b1aeac25e
Renamed outdated url to uri.
2014-05-04 02:11:49 +02:00
Max Shytikov
1190a0e62e
Removed default '80' port of uri in tests
2014-05-04 02:11:49 +02:00
Max Shytikov
61e3bdc402
Added tetst for uri and port of Request
2014-05-03 22:31:30 +02:00
Max Shytikov
1ff5d08c8b
Fixed typo
2014-05-02 07:32:18 +02:00
Max Shytikov
1d8e2dbb41
Removed accidental print call
2014-05-02 07:32:18 +02:00
Max Shytikov
62d19e5cc1
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
2014-05-02 07:32:18 +02:00
Max Shytikov
3d2da26933
Updated test to use new headers structure
2014-05-02 07:32:18 +02:00
Max Shytikov
65c2797f94
Updated test for filters. Mock replaced with real Request object
2014-05-02 07:32:18 +02:00
Max Shytikov
998dde61ec
Updated _remove_query_parameters to use latest Request Api
2014-05-02 07:32:17 +02:00
Max Shytikov
faa83b9aba
Fixed name of the variable
2014-05-02 07:32:17 +02:00
Max Shytikov
a48f621bae
Updated _remove_headers to use latest Headers structure
...
Probably we need API in Request object like 'remove_header'
2014-05-02 07:32:17 +02:00
Max Shytikov
fbd5049d38
Updated test to use new Request constructor
2014-05-02 07:32:17 +02:00
Max Shytikov
7b253ebc6f
pep8
2014-05-02 07:32:17 +02:00
Max Shytikov
5d1f35973d
Make code 2.6 compatible
2014-05-02 07:32:17 +02:00
Max Shytikov
fbb6382c12
Added migration for Request headers to be a dict of lists
2014-05-02 07:32:17 +02:00
Max Shytikov
eab10578d5
Make Request headers to be a dict of lists
2014-05-02 07:32:15 +02:00
Max Shytikov
e4d1db0617
Removed frozenset
2014-04-30 02:38:01 +02:00
Max Shytikov
7e677f516d
Deleted unnecessary __hash__ method of Request
2014-04-30 02:36:27 +02:00
Max Shytikov
34ce0a35ec
Updated wild fixtures in correspondence with new fixture format
2014-04-30 02:36:27 +02:00
Max Shytikov
b6195bf41e
Updated migration fixtures in correspondence with new fixture format
2014-04-30 02:36:27 +02:00
Max Shytikov
eedafb19ee
Added more test for persist
2014-04-30 02:36:27 +02:00
Max Shytikov
434d6325ea
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
2014-04-30 02:36:27 +02:00
Max Shytikov
25c0141e27
Updated migration script to use new yaml serialization
2014-04-30 02:36:26 +02:00
Max Shytikov
1e995c3c9b
Replaced yaml dump of Request object with plain dict dump
2014-04-30 02:36:26 +02:00
Max Shytikov
0408bdaadb
Added checkfor old cassette on load cassete to persist module
2014-04-30 02:36:26 +02:00
Max Shytikov
9c9612f93e
Fixed crazy/stupid implementation mistakes
2014-04-30 02:36:26 +02:00
Max Shytikov
a3eac1f0ec
Added tests for persist module
2014-04-30 02:36:26 +02:00
Max Shytikov
710ec6f432
Added "New Cassette Format" section to readme
2014-04-30 02:36:26 +02:00
Max Shytikov
9d8426e668
Make migration python 2.6 compatible
2014-04-30 02:36:26 +02:00
Max Shytikov
424c658da4
Fixed open tmp file in python3
2014-04-30 02:36:26 +02:00
Max Shytikov
f0972628ef
Fixed migration for one file
2014-04-30 02:36:26 +02:00
Max Shytikov
ee28768a31
Added migration script for old cassettes
2014-04-30 02:36:26 +02:00
Max Shytikov
5354ef781c
Formatted setup.py to make flake8 happy
2014-04-30 02:36:25 +02:00
Max Shytikov
750e141b9d
Added integration tests for matchers
2014-04-30 02:36:25 +02:00
Max Shytikov
a042cb3824
Updated README
2014-04-30 02:36:25 +02:00
Max Shytikov
96d8782d08
Added 'protocol' to Request for backwards compatibility
2014-04-30 02:31:11 +02:00
Max Shytikov
f9a64e1609
Fixed available matchers declaration
2014-04-30 02:31:11 +02:00
Max Shytikov
2fa1aaa1f7
Replaced 'url' mather with 'uri'.
2014-04-30 02:31:11 +02:00