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,
249249 """
250250 host = route .attrs ['host' ] or 'api'
251251 route_name = namespace + '/' + route .name
252+ if route .version > 1 :
253+ route_name += '_v{}' .format (route .version )
252254 route_style = route .attrs ['style' ] or 'rpc'
253255 serialized_arg = stone_serializers .json_encode (route .arg_type ,
254256 request_arg )
Original file line number Diff line number Diff line change 3232 PathRootError ,
3333)
3434from dropbox .files import (
35+ DeleteResult ,
3536 ListFolderError ,
3637)
3738from dropbox .common import (
@@ -191,6 +192,17 @@ def test_path_root_err(self, dbx):
191192 dbxpr .files_list_folder ('' )
192193 self .assertTrue (cm .exception .error .is_invalid_root ())
193194
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+
194206class TestDropboxTeam (unittest .TestCase ):
195207 @dbx_team_from_env
196208 def test_team (self , dbxt ):
You can’t perform that action at this time.
0 commit comments