mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
test for xmlrpclib to make sure #140 is actually fixed.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import pytest
|
||||
from six.moves import xmlrpc_client
|
||||
|
||||
requests = pytest.importorskip("requests")
|
||||
|
||||
import vcr
|
||||
@@ -72,3 +74,16 @@ def test_amazon_doctype(tmpdir):
|
||||
with vcr.use_cassette(str(tmpdir.join('amz.yml'))):
|
||||
r = requests.get('http://www.amazon.com')
|
||||
assert 'html' in r.text
|
||||
|
||||
|
||||
def test_xmlrpclib(tmpdir):
|
||||
with vcr.use_cassette(str(tmpdir.join('xmlrpcvideo.yaml'))):
|
||||
roundup_server = xmlrpc_client.ServerProxy('http://bugs.python.org/xmlrpc', allow_none=True)
|
||||
original_schema = roundup_server.schema()
|
||||
|
||||
with vcr.use_cassette(str(tmpdir.join('xmlrpcvideo.yaml'))) as cassette:
|
||||
roundup_server = xmlrpc_client.ServerProxy('http://bugs.python.org/xmlrpc', allow_none=True)
|
||||
second_schema = roundup_server.schema()
|
||||
|
||||
assert original_schema == second_schema
|
||||
|
||||
|
||||
Reference in New Issue
Block a user