MCPcopy Index your code
hub / github.com/python/cpython / test_non_existing_multicall

Method test_non_existing_multicall

Lib/test/test_xmlrpc.py:938–957  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

936 self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
937
938 def test_non_existing_multicall(self):
939 try:
940 p = xmlrpclib.ServerProxy(URL)
941 multicall = xmlrpclib.MultiCall(p)
942 multicall.this_is_not_exists()
943 result = multicall()
944
945 # result.results contains;
946 # [{'faultCode': 1, 'faultString': '<class \'exceptions.Exception\'>:'
947 # 'method "this_is_not_exists" is not supported'>}]
948
949 self.assertEqual(result.results[0]['faultCode'], 1)
950 self.assertEqual(result.results[0]['faultString'],
951 '<class \'Exception\'>:method "this_is_not_exists" '
952 'is not supported')
953 except (xmlrpclib.ProtocolError, OSError) as e:
954 # ignore failures due to non-blocking socket 'unavailable' errors
955 if not is_unavailable_exception(e):
956 # protocol error; provide additional information in test output
957 self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
958
959 def test_dotted_attribute(self):
960 # Raises an AttributeError because private methods are not allowed.

Callers

nothing calls this directly

Calls 3

is_unavailable_exceptionFunction · 0.85
assertEqualMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected