Add three pieces of the Session interface
In trying to use betamax with a keystoneauth1 Session, which interacts by mounting itself as an adapter, it became clear that our wrapping of requests.Session was incomplete in that regard. Adding an adapters property with a setter and a mount method worked and betamax is now totally usable with keystoneauth1.session. Closes-Bug:#1516382 Change-Id: I1ebc4a726bb516349714e55eb97b384ed40b42cf
This commit is contained in:
parent
5cc721582b
commit
3a7a703aff
|
@ -124,6 +124,17 @@ class Session(object):
|
|||
|
||||
self._json = _JSONEncoder()
|
||||
|
||||
@property
|
||||
def adapters(self):
|
||||
return self.session.adapters
|
||||
|
||||
@adapters.setter
|
||||
def adapters(self, value):
|
||||
self.session.adapters = value
|
||||
|
||||
def mount(self, scheme, adapter):
|
||||
self.session.mount(scheme, adapter)
|
||||
|
||||
def _remove_service_catalog(self, body):
|
||||
try:
|
||||
data = json.loads(body)
|
||||
|
|
Loading…
Reference in New Issue