def test_approve_addons_approve_files(use_case, mozilla_user):
 (addon, file1, file2, review_type) = use_case
 approve_addons.approve_files([(file1, review_type), (file2, review_type)])
 assert (file1.reload().status == amo.STATUS_PUBLIC)
 assert (file2.reload().status == amo.STATUS_PUBLIC)
 logs = AddonLog.objects.filter(addon=addon)
 assert (len(logs) == 2)
 (file1_log, file2_log) = logs
 assert (file1_log.activity_log.details['comments'] == u'bulk approval')
 assert (file1_log.activity_log.user == mozilla_user)
 assert (file2_log.activity_log.details['comments'] == u'bulk approval')
 assert (file2_log.activity_log.user == mozilla_user)
 assert (not ReviewerScore.objects.all())

def test_approve_addons_approve_files ( use_case , mozilla_user ) : ( addon , file1 , file2 , review_type ) = use_case approve_addons . approve_files ( [ ( file1 , review_type ) , ( file2 , review_type ) ] ) assert ( file1 . reload ( ) . status == amo . STATUS_PUBLIC ) assert ( file2 . reload ( ) . status == amo . STATUS_PUBLIC ) logs = AddonLog . objects . filter ( addon = addon ) assert ( len ( logs ) == 2 ) ( file1_log , file2_log ) = logs assert ( file1_log . activity_log . details [ 'comments' ] == u'bulk approval' ) assert ( file1_log . activity_log . user == mozilla_user ) assert ( file2_log . activity_log . details [ 'comments' ] == u'bulk approval' ) assert ( file2_log . activity_log . user == mozilla_user ) assert ( not ReviewerScore . objects . all ( ) )
files are approved using the correct review type .