def test_get_from_s3_repo_error(self, mocked_s3client): mocked_s3client.return_value.get_object.side_effect = ClientError( {'Error': { 'Code': 'NoSuchBucket' }}, '') with self.assertRaises(repo.RepositoryError): repo._get_from_repo('s3', 'test', 'foo')
def test_get_from_s3_repo_error(self, mocked_s3client): mocked_s3client.return_value.get_object.side_effect = ClientError( {"Error": { "Code": "NoSuchBucket" }}, "") with self.assertRaises(repo.RepositoryError): repo._get_from_repo("s3", "test", "foo")
def test_get_from_s3_ok(self, mocked_s3client): repo._get_from_repo('s3', 'test', 'bar') mocked_s3client.return_value.get_object.assert_called()
def test_get_from_s3_ok(self, mocked_s3client): repo._get_from_repo("s3", "test", "bar") mocked_s3client.return_value.get_object.assert_called()