]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
test for xmlrpclib to make sure #140 is actually fixed.
authorIvan Malison <imalison@uber.com>
Tue, 9 Jun 2015 08:13:58 +0000 (01:13 -0700)
committerIvan Malison <imalison@uber.com>
Tue, 9 Jun 2015 08:13:58 +0000 (01:13 -0700)
tests/integration/test_wild.py

index e32e1efa6e6a08be466406144c1d3fba807f1802..2d446fb1ae884ee7bda97942b5052f97849de0bb 100644 (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
+