Skip to content

Commit 05bab28

Browse files
authored
FileApi test fails because recent files list is too long (#53)
1 parent 6cb357a commit 05bab28

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

smartlingApiSdk/example/FilesExample.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ def checkGetRecentlyUploadedSourceFilesList(self):
279279
details : https://api-reference.smartling.com/#operation/getRecentlyUploadedSourceFilesList
280280
"""
281281
fileTypes=[FileTypes.android, FileTypes.javaProperties]
282-
res, status = self.files_api.getRecentlyUploadedSourceFilesList(fileTypes=fileTypes)
282+
orderBy='created_desc'
283+
res, status = self.files_api.getRecentlyUploadedSourceFilesList(fileTypes=fileTypes, orderBy=orderBy)
283284

284285

285286
uris = [x['fileUri'] for x in res.data.items]

test/testFiles.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ def checkGetRecentlyUploadedSourceFilesList(self):
279279
details : https://api-reference.smartling.com/#operation/getRecentlyUploadedSourceFilesList
280280
"""
281281
fileTypes=[FileTypes.android, FileTypes.javaProperties]
282-
res, status = self.files_api.getRecentlyUploadedSourceFilesList(fileTypes=fileTypes)
282+
orderBy='created_desc'
283+
res, status = self.files_api.getRecentlyUploadedSourceFilesList(fileTypes=fileTypes, orderBy=orderBy)
283284

284285

285286
uris = [x['fileUri'] for x in res.data.items]

testdata/FilesTestData.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ def getZipFile(self, res):
199199

200200
'getRecentlyUploadedSourceFilesList' : TestData(
201201
{
202-
'fileTypes' : Code('[FileTypes.android, FileTypes.javaProperties]')
202+
'fileTypes' : Code('[FileTypes.android, FileTypes.javaProperties]'),
203+
'orderBy' : 'created_desc'
203204
},
204205
customTestCheck='''
205206
uris = [x['fileUri'] for x in res.data.items]

0 commit comments

Comments
 (0)