mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Automatically decorate dynamically added methods with auto_decorate
This commit is contained in:
@@ -283,6 +283,8 @@ class TestVCRClass(VCR().test_case()):
|
||||
|
||||
def no_decoration(self):
|
||||
assert httplib.HTTPConnection == _HTTPConnection
|
||||
self.test_dynamically_added()
|
||||
assert httplib.HTTPConnection == _HTTPConnection
|
||||
|
||||
def test_one(self):
|
||||
with force_reset():
|
||||
@@ -293,3 +295,11 @@ class TestVCRClass(VCR().test_case()):
|
||||
|
||||
def test_two(self):
|
||||
assert httplib.HTTPConnection != _HTTPConnection
|
||||
|
||||
|
||||
def test_dynamically_added(self):
|
||||
assert httplib.HTTPConnection != _HTTPConnection
|
||||
|
||||
|
||||
TestVCRClass.test_dynamically_added = test_dynamically_added
|
||||
del test_dynamically_added
|
||||
|
||||
Reference in New Issue
Block a user