Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion dropbox/dropbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ def request(self,

deserialized_result = babel_serializers.json_compat_obj_decode(
returned_data_type, obj, strict=False)
print(deserialized_result)

if isinstance(res, RouteErrorResult):
raise ApiError(deserialized_result,
Expand Down
11 changes: 6 additions & 5 deletions test/test_dropbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_bad_auth(self):
invalid_token_dbx = Dropbox(INVALID_TOKEN)
with self.assertRaises(AuthError) as cm:
invalid_token_dbx.files_list_folder('')
self.assertEqual(cm.exception.reason['error']['.tag'],
self.assertEqual(cm.exception.error['error']['.tag'],
'invalid_access_token')

def test_rpc(self):
Expand All @@ -55,7 +55,7 @@ def test_rpc(self):
''.join(random.sample(string.ascii_letters, 15))
with self.assertRaises(ApiError) as cm:
self.dbx.files_list_folder(random_folder_path)
self.assertIsInstance(cm.exception.reason, ListFolderError)
self.assertIsInstance(cm.exception.error, ListFolderError)

def test_upload_download(self):
# Upload file
Expand Down Expand Up @@ -115,9 +115,10 @@ def setUp(self):

self.test_dir = "/Test/%s" % str(datetime.datetime.utcnow())

self.foo = 'foo.txt'
self.frog = 'Costa Rican Frog.jpg'
self.song = 'dropbox_song.mp3'
local_test_dir = os.path.dirname(__file__)
self.foo = os.path.join(local_test_dir, 'foo.txt')
self.frog = os.path.join(local_test_dir, 'Costa Rican Frog.jpg')
self.song = os.path.join(local_test_dir, 'dropbox_song.mp3')

def tearDown(self):
try:
Expand Down