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

reorganize tests, start using pytest

This commit is contained in:
Kevin McCarthy
2013-02-21 22:15:57 -10:00
parent 71d0392419
commit c90778274e
5 changed files with 35 additions and 28 deletions

13
tests/utils.py Normal file
View File

@@ -0,0 +1,13 @@
import json
def assert_httpbin_responses_equal(body1, body2):
"""
httpbin.org returns a different `origin` header
each time, so strip this out since it makes testing
difficult.
"""
body1, body2 = json.loads(body1), json.loads(body2)
del body1['origin']
del body2['origin']
assert body1 == body2