1
0
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:
Ivan Malison
2015-06-09 01:13:58 -07:00
parent 6cbc0fb279
commit 731a33a79a

View File

@@ -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