Make it easier to mock auth class.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/ea7409e9 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/ea7409e9 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/ea7409e9 Branch: refs/heads/trunk Commit: ea7409e9da9b1c8d10acfdc61a85da8f8c51b62a Parents: 88c2278 Author: Tomaz Muraus <[email protected]> Authored: Sun Jan 17 19:21:20 2016 +0100 Committer: Tomaz Muraus <[email protected]> Committed: Sun Jan 17 19:21:20 2016 +0100 ---------------------------------------------------------------------- libcloud/storage/drivers/backblaze_b2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/ea7409e9/libcloud/storage/drivers/backblaze_b2.py ---------------------------------------------------------------------- diff --git a/libcloud/storage/drivers/backblaze_b2.py b/libcloud/storage/drivers/backblaze_b2.py index 08cc63e..2481e51 100644 --- a/libcloud/storage/drivers/backblaze_b2.py +++ b/libcloud/storage/drivers/backblaze_b2.py @@ -129,13 +129,14 @@ class BackblazeB2Connection(ConnectionUserAndKey): host = None # Note: host is set after authentication secure = True responseCls = BackblazeB2Response + authCls = BackblazeB2AuthConnection def __init__(self, *args, **kwargs): super(BackblazeB2Connection, self).__init__(*args, **kwargs) # Stores info retrieved after authentication (auth token, api url, # dowload url). - self._auth_conn = BackblazeB2AuthConnection(*args, **kwargs) + self._auth_conn = self.authCls(*args, **kwargs) def download_request(self, action, params=None): # Lazily perform authentication
