Skip to content

Commit 37c85e4

Browse files
ewjoachimbraincore
authored andcommitted
Pull request dropbox#19.
- Remove forgotten debug print statement. - Make tests launchable from anywhere. - Fix tests after "reason"/"error" refactoring.
1 parent 934f06a commit 37c85e4

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
# built documents.
6060
#
6161
# The short X.Y version.
62-
version = '3.33'
62+
version = '3.34'
6363
# The full version, including alpha/beta/rc tags.
64-
release = '3.33'
64+
release = '3.34'
6565

6666
# The language for content autogenerated by Sphinx. Refer to documentation
6767
# for a list of supported languages.

dropbox/dropbox.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
]
44

55
# TODO(kelkabany): We need to auto populate this as done in the v1 SDK.
6-
__version__ = '3.33'
6+
__version__ = '3.34'
77

88
import contextlib
99
import json
@@ -193,7 +193,6 @@ def request(self,
193193

194194
deserialized_result = babel_serializers.json_compat_obj_decode(
195195
returned_data_type, obj, strict=False)
196-
print(deserialized_result)
197196

198197
if isinstance(res, RouteErrorResult):
199198
raise ApiError(deserialized_result,

dropbox/rest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
else:
3232
url_encode = urllib.urlencode
3333

34-
SDK_VERSION = "3.33"
34+
SDK_VERSION = "3.34"
3535

3636
TRUSTED_CERT_FILE = pkg_resources.resource_filename(__name__, 'trusted-certs.crt')
3737

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
dist = setup(
2727
name='dropbox',
28-
version='3.33',
28+
version='3.34',
2929
description='Official Dropbox API Client',
3030
author='Dropbox',
3131
author_email='dev-platform@dropbox.com',

test/test_dropbox.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_bad_auth(self):
4444
invalid_token_dbx = Dropbox(INVALID_TOKEN)
4545
with self.assertRaises(AuthError) as cm:
4646
invalid_token_dbx.files_list_folder('')
47-
self.assertEqual(cm.exception.reason['error']['.tag'],
47+
self.assertEqual(cm.exception.error['error']['.tag'],
4848
'invalid_access_token')
4949

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

6060
def test_upload_download(self):
6161
# Upload file
@@ -115,9 +115,10 @@ def setUp(self):
115115

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

118-
self.foo = 'foo.txt'
119-
self.frog = 'Costa Rican Frog.jpg'
120-
self.song = 'dropbox_song.mp3'
118+
local_test_dir = os.path.dirname(__file__)
119+
self.foo = os.path.join(local_test_dir, 'foo.txt')
120+
self.frog = os.path.join(local_test_dir, 'Costa Rican Frog.jpg')
121+
self.song = os.path.join(local_test_dir, 'dropbox_song.mp3')
121122

122123
def tearDown(self):
123124
try:

0 commit comments

Comments
 (0)