Esempio n. 1
0
 def setUp(self):
     self.bucket_name = 'my-bucket'
     self.simulator = RawSimulator()
     self.account_info = StubAccountInfo()
     self.api = B2Api(self.account_info, raw_api=self.simulator)
     self.api.authorize_account('production', 'my-account', 'good-app-key')
     self.bucket = self.api.create_bucket('my-bucket', 'allPublic')
 def setUp(self):
     self.bucket_name = 'my-bucket'
     self.simulator = RawSimulator()
     self.account_info = StubAccountInfo()
     self.api = B2Api(self.account_info, raw_api=self.simulator)
     (self.account_id, self.master_key) = self.simulator.create_account()
     self.api.authorize_account('production', self.account_id,
                                self.master_key)
     self.api_url = self.account_info.get_api_url()
     self.account_auth_token = self.account_info.get_account_auth_token()
     self.bucket = self.api.create_bucket('my-bucket', 'allPublic')
     self.bucket_id = self.bucket.id_
Esempio n. 3
0
 def setUp(self):
     self.account_info = StubAccountInfo()
     self.cache = InMemoryCache()
     self.raw_api = RawSimulator()
     self.b2_api = B2Api(self.account_info, self.cache, self.raw_api)
Esempio n. 4
0
 def setUp(self):
     self.account_info = InMemoryAccountInfo()
     self.cache = DummyCache()
     self.raw_api = RawSimulator()
     self.api = B2Api(self.account_info, self.cache, self.raw_api)
     (self.account_id, self.master_key) = self.raw_api.create_account()