File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,8 @@ def request(self,
249
249
"""
250
250
host = route .attrs ['host' ] or 'api'
251
251
route_name = namespace + '/' + route .name
252
+ if route .version > 1 :
253
+ route_name += '_v{}' .format (route .version )
252
254
route_style = route .attrs ['style' ] or 'rpc'
253
255
serialized_arg = stone_serializers .json_encode (route .arg_type ,
254
256
request_arg )
Original file line number Diff line number Diff line change 32
32
PathRootError ,
33
33
)
34
34
from dropbox .files import (
35
+ DeleteResult ,
35
36
ListFolderError ,
36
37
)
37
38
from dropbox .common import (
@@ -191,6 +192,17 @@ def test_path_root_err(self, dbx):
191
192
dbxpr .files_list_folder ('' )
192
193
self .assertTrue (cm .exception .error .is_invalid_root ())
193
194
195
+ @dbx_from_env
196
+ def test_versioned_route (self , dbx ):
197
+ # Upload a test file
198
+ path = '/test.txt'
199
+ dbx .files_upload (DUMMY_PAYLOAD , path )
200
+
201
+ # Delete the file with v2 route
202
+ resp = dbx .files_delete_v2 (path )
203
+ # Verify response type is of v2 route
204
+ self .assertIsInstance (resp , DeleteResult )
205
+
194
206
class TestDropboxTeam (unittest .TestCase ):
195
207
@dbx_team_from_env
196
208
def test_team (self , dbxt ):
You can’t perform that action at this time.
0 commit comments