@@ -439,19 +439,20 @@ def test_simple_summary(self):
439439 assert (result ['summaries' ])
440440
441441 def test_summary_include_archived_projects (self ):
442- # archive project
443- self .sg .update ('Project' , self .project ['id' ], {'archived' :True })
444- # Ticket #25082 ability to hide archived projects in summary
445- summaries = [{'field' : 'id' , 'type' : 'count' }]
446- grouping = [{'direction' : 'asc' , 'field' : 'id' , 'type' : 'exact' }]
447- filters = [['project' , 'is' , self .project ]]
448- result = self .sg .summarize ('Shot' ,
449- filters = filters ,
450- summary_fields = summaries ,
451- grouping = grouping ,
452- include_archived_projects = False )
453- self .assertEqual (result ['summaries' ]['id' ], 0 )
454- self .sg .update ('Project' , self .project ['id' ], {'archived' :False })
442+ if self .sg .server_caps .version > (5 , 3 , 13 ):
443+ # archive project
444+ self .sg .update ('Project' , self .project ['id' ], {'archived' :True })
445+ # Ticket #25082 ability to hide archived projects in summary
446+ summaries = [{'field' : 'id' , 'type' : 'count' }]
447+ grouping = [{'direction' : 'asc' , 'field' : 'id' , 'type' : 'exact' }]
448+ filters = [['project' , 'is' , self .project ]]
449+ result = self .sg .summarize ('Shot' ,
450+ filters = filters ,
451+ summary_fields = summaries ,
452+ grouping = grouping ,
453+ include_archived_projects = False )
454+ self .assertEqual (result ['summaries' ]['id' ], 0 )
455+ self .sg .update ('Project' , self .project ['id' ], {'archived' :False })
455456
456457 def test_summary_values (self ):
457458 ''''''
@@ -1336,22 +1337,23 @@ def test_zero_is_not_none(self):
13361337 self .assertFalse (result == None )
13371338
13381339 def test_include_archived_projects (self ):
1339- # Ticket #25082
1340- result = self .sg .find_one ('Shot' , [['id' ,'is' ,self .shot ['id' ]]])
1341- self .assertEquals (self .shot ['id' ], result ['id' ])
1340+ if self .sg .server_caps .version > (5 , 3 , 13 ):
1341+ # Ticket #25082
1342+ result = self .sg .find_one ('Shot' , [['id' ,'is' ,self .shot ['id' ]]])
1343+ self .assertEquals (self .shot ['id' ], result ['id' ])
13421344
1343- # archive project
1344- self .sg .update ('Project' , self .project ['id' ], {'archived' :True })
1345+ # archive project
1346+ self .sg .update ('Project' , self .project ['id' ], {'archived' :True })
13451347
1346- # setting defaults to True, so we should get result
1347- result = self .sg .find_one ('Shot' , [['id' ,'is' ,self .shot ['id' ]]])
1348- self .assertEquals (self .shot ['id' ], result ['id' ])
1348+ # setting defaults to True, so we should get result
1349+ result = self .sg .find_one ('Shot' , [['id' ,'is' ,self .shot ['id' ]]])
1350+ self .assertEquals (self .shot ['id' ], result ['id' ])
13491351
1350- result = self .sg .find_one ('Shot' , [['id' ,'is' ,self .shot ['id' ]]], include_archived_projects = False )
1351- self .assertEquals (None , result )
1352+ result = self .sg .find_one ('Shot' , [['id' ,'is' ,self .shot ['id' ]]], include_archived_projects = False )
1353+ self .assertEquals (None , result )
13521354
1353- # unarchive project
1354- self .sg .update ('Project' , self .project ['id' ], {'archived' :False })
1355+ # unarchive project
1356+ self .sg .update ('Project' , self .project ['id' ], {'archived' :False })
13551357
13561358class TestFollow (base .LiveTestBase ):
13571359 def setUp (self ):
0 commit comments