Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Commit

Permalink
bump version & comment unimplemented test
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Apr 2, 2018
1 parent a7727fa commit 7cbf374
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 35 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
)

setup(name='python_libstorj',
version='0.1a',
version='1a',
author="Bryan White",
author_email="[email protected]",
url="https://github.com/storj/python-libstorj",
Expand Down
60 changes: 26 additions & 34 deletions tests/test_storj_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,37 +513,29 @@ def callback(error, file_):
self.fail('Callback not called!')


class TestResolveFileFailure(TestStorjEnvBadHost):
def setUp(self):
super(TestResolveFileFailure, self).setUp()
self.file_name = 'test.data'
self.file_path = path.join(path.dirname(path.realpath(__file__)), 'upload.data')
self.upload_options = {
'file_name': self.file_name
}
self.bucket = {'id': 'python_libstorj-test-4_id'}

def test_store_file_without_callback_failure(self):
self.assertRaisesWithStatus7000(self.env.store_file,
self.bucket['id'],
self.file_path,
options=self.upload_options)

def test_store_file_with_callback_failure(self):
results = {}

def callback(error, file_):
results['error'] = error
results['file'] = file_

self.assertRaisesWithStatus7000(self.env.store_file,
self.bucket['id'],
self.file_path,
options=self.upload_options,
finished_callback=callback)
try:
error, file_ = [results[k] for k in ('error', 'file')]
self.assertStatus7000Error(error)
self.assertEqual(file_, None)
except KeyError:
self.fail('Callback not called!')
# class TestResolveFileFailure(TestStorjEnvBadHost):
# def setUp(self):
# super(TestResolveFileFailure, self).setUp()
# self.bucket = {'id': 'python_libstorj-test-4_id'}
# self.file = {'id': 'test.data'}
#
# def test_resolve_file_without_callback_failure(self):
# self.assertRaisesWithStatus7000(self.env.resolve_file,
# self.bucket['id'],
# self.file['id'])
#
# def test_resolve_file_with_callback_failure(self):
# results = {}
#
# def callback(error):
# results['error'] = error
#
# self.assertRaisesWithStatus7000(self.env.resolve_file,
# self.bucket['id'],
# self.file['id'],
# finished_callback=callback)
# try:
# error, file_ = [results[k] for k in ('error', 'file')]
# self.assertStatus7000Error(error)
# except KeyError:
# self.fail('Callback not called!')

0 comments on commit 7cbf374

Please sign in to comment.