Don't use 'requests.PreparedRequest'
We're using 'requests.PreparedRequest' in one place in the tests.
However, the requests docs have a warning that one shouldn't do this:
Instances are generated from a Request object, and should not be
instantiated manually; doing so may produce undesirable effects.
It seems we're now seeing just such an effect, as requests has started
attempting to do proxy-related things resulting in the following error:
Traceback (most recent call last):
File "/usr/lib64/python3.6/unittest/mock.py", line 1183, in patched
return func(*args, **keywargs)
File ".../oslo.vmware/oslo_vmware/tests/test_service.py", line 518, in test_send_with_local_file_url
resp = transport.session.send(request)
File ".../oslo.vmware/.tox/py36/lib/python3.6/site-packages/requests/sessions.py", line 636, in send
kwargs.setdefault('proxies', self.rebuild_proxies(request, self.proxies))
File ".../oslo.vmware/.tox/py36/lib/python3.6/site-packages/requests/sessions....