def get_package_list(): """ Load the list of packages from `PyPi`. """ monkey_patch() client = xmlrpc_client.ServerProxy("https://pypi.python.org/pypi") packages = client.list_packages() unmonkey_patch() return packages
def test_monkeypatch(self): try: xmlrpc.monkey_patch() finally: xmlrpc.unmonkey_patch()