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

remove fixtures, remove some dead httpbin assert code

This commit is contained in:
Kevin McCarthy
2013-08-05 20:54:16 -10:00
parent 7fedd8c584
commit 4fe6f463c3
7 changed files with 2 additions and 197 deletions

View File

@@ -1,7 +1,6 @@
# coding=utf-8
import os
import json
import shutil
import unittest
@@ -10,21 +9,10 @@ class TestVCR(unittest.TestCase):
fixtures = os.path.join('does', 'not', 'exist')
def tearDown(self):
# Remove the urllib2 fixtures if they exist
# Remove the fixtures if they exist
if os.path.exists(self.fixtures):
shutil.rmtree(self.fixtures)
def fixture(self, *names):
'''Return a path to the provided fixture'''
return os.path.join(self.fixtures, *names)
def assertBodiesEqual(self, one, two):
"""
httpbin.org returns a different `origin` header
each time, so strip this out since it makes testing
difficult.
"""
one, two = json.loads(one), json.loads(two)
del one['origin']
del two['origin']
self.assertEqual(one, two)