1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 01:03:24 +00:00

Use Content-Type based approach for body matcher

When converting objects to body, dicts and sets order can change
resulting in a different but same body. This fixes the issue by
comparing the enclosed data in the body rather than the body itself
while still allowing raw body matching with the raw_body matcher.
This commit is contained in:
Diaoul
2015-07-04 18:57:37 +02:00
parent cc6c26646c
commit 3986caf182
3 changed files with 24 additions and 2 deletions

View File

@@ -47,6 +47,7 @@ class VCR(object):
'path': matchers.path,
'query': matchers.query,
'headers': matchers.headers,
'raw_body': matchers.raw_body,
'body': matchers.body,
}
self.record_mode = record_mode