@@ -417,7 +417,7 @@ def test_actions_content_review_rejected(self):
417417 ]
418418 AddonApprovalsCounter .objects .create (
419419 addon = self .addon ,
420- last_content_review_pass = False ,
420+ last_content_review_status = AddonApprovalsCounter . CONTENT_REVIEW_STATUSES . FAIL ,
421421 )
422422 assert (
423423 list (
@@ -1922,7 +1922,8 @@ def test_nomination_but_rejected_to_public(self):
19221922 self .sign_file_mock .reset ()
19231923 self .setup_data (amo .STATUS_REJECTED )
19241924 AddonApprovalsCounter .objects .create (
1925- addon = self .addon , last_content_review_pass = False
1925+ addon = self .addon ,
1926+ last_content_review_status = AddonApprovalsCounter .CONTENT_REVIEW_STATUSES .FAIL ,
19261927 )
19271928 AutoApprovalSummary .objects .update_or_create (
19281929 version = self .review_version ,
@@ -1942,7 +1943,10 @@ def test_nomination_but_rejected_to_public(self):
19421943 # AddonApprovalsCounter counter is now at 1 for this addon.
19431944 approval_counter = AddonApprovalsCounter .objects .get (addon = self .addon )
19441945 assert approval_counter .counter == 1
1945- assert approval_counter .last_content_review_pass is False # hasn't changed
1946+ assert (
1947+ approval_counter .last_content_review_status
1948+ == AddonApprovalsCounter .CONTENT_REVIEW_STATUSES .FAIL
1949+ ) # hasn't changed
19461950
19471951 self .sign_file_mock .assert_called_with (self .file )
19481952 assert storage .exists (self .file .file .path )
@@ -1995,7 +1999,8 @@ def test_nomination_to_public_not_human(self):
19951999 def test_nomination_but_listing_rejected_to_public_not_human (self ):
19962000 self .setup_data (amo .STATUS_REJECTED , human_review = False )
19972001 approval_counter = AddonApprovalsCounter .objects .create (
1998- addon = self .addon , last_content_review_pass = False
2002+ addon = self .addon ,
2003+ last_content_review_status = AddonApprovalsCounter .CONTENT_REVIEW_STATUSES .FAIL ,
19992004 )
20002005 self .sign_file_mock .reset ()
20012006
@@ -3559,7 +3564,10 @@ def test_approve_listing_content_review(self):
35593564 assert approvals_counter .counter == 0
35603565 assert approvals_counter .last_human_review is None
35613566 self .assertCloseToNow (approvals_counter .last_content_review )
3562- assert approvals_counter .last_content_review_pass is True
3567+ assert (
3568+ approvals_counter .last_content_review_status
3569+ == AddonApprovalsCounter .CONTENT_REVIEW_STATUSES .PASS
3570+ )
35633571 assert self .check_log_count (amo .LOG .CONFIRM_AUTO_APPROVED .id ) == 0
35643572 assert self .check_log_count (amo .LOG .APPROVE_LISTING_CONTENT .id ) == 1
35653573 activity = (
@@ -3604,7 +3612,10 @@ def test_approve_listing_content_review_with_policies(self):
36043612 assert approvals_counter .counter == 0
36053613 assert approvals_counter .last_human_review is None
36063614 self .assertCloseToNow (approvals_counter .last_content_review )
3607- assert approvals_counter .last_content_review_pass is True
3615+ assert (
3616+ approvals_counter .last_content_review_status
3617+ == AddonApprovalsCounter .CONTENT_REVIEW_STATUSES .PASS
3618+ )
36083619 assert self .check_log_count (amo .LOG .CONFIRM_AUTO_APPROVED .id ) == 0
36093620 assert self .check_log_count (amo .LOG .APPROVE_LISTING_CONTENT .id ) == 1
36103621 activity = (
@@ -3622,7 +3633,8 @@ def test_approve_listing_content_review_with_policies(self):
36223633 def test_approve_rejected_listing_content_review (self ):
36233634 self .grant_permission (self .user , 'Addons:ContentReview' )
36243635 approvals_counter = AddonApprovalsCounter .objects .create (
3625- addon = self .addon , last_content_review_pass = False
3636+ addon = self .addon ,
3637+ last_content_review_status = AddonApprovalsCounter .CONTENT_REVIEW_STATUSES .REQUESTED ,
36263638 )
36273639 self .setup_data (
36283640 amo .STATUS_REJECTED , file_status = amo .STATUS_APPROVED , content_review = True
@@ -3647,7 +3659,10 @@ def test_approve_rejected_listing_content_review(self):
36473659 assert approvals_counter .reload ().counter == 0
36483660 assert approvals_counter .last_human_review is None
36493661 self .assertCloseToNow (approvals_counter .last_content_review )
3650- assert approvals_counter .last_content_review_pass is True
3662+ assert (
3663+ approvals_counter .last_content_review_status
3664+ == AddonApprovalsCounter .CONTENT_REVIEW_STATUSES .PASS
3665+ )
36513666 assert self .check_log_count (amo .LOG .CONFIRM_AUTO_APPROVED .id ) == 0
36523667 assert self .check_log_count (amo .LOG .APPROVE_REJECTED_LISTING_CONTENT .id ) == 1
36533668 activity = (
@@ -3668,7 +3683,8 @@ def test_approve_rejected_listing_content_review(self):
36683683 def test_approve_rejected_listing_content_review_with_policies (self ):
36693684 self .grant_permission (self .user , 'Addons:ContentReview' )
36703685 approvals_counter = AddonApprovalsCounter .objects .create (
3671- addon = self .addon , last_content_review_pass = False
3686+ addon = self .addon ,
3687+ last_content_review_status = AddonApprovalsCounter .CONTENT_REVIEW_STATUSES .REQUESTED ,
36723688 )
36733689 self .setup_data (
36743690 amo .STATUS_REJECTED , file_status = amo .STATUS_APPROVED , content_review = True
@@ -3697,7 +3713,10 @@ def test_approve_rejected_listing_content_review_with_policies(self):
36973713 assert approvals_counter .reload ().counter == 0
36983714 assert approvals_counter .last_human_review is None
36993715 self .assertCloseToNow (approvals_counter .last_content_review )
3700- assert approvals_counter .last_content_review_pass is True
3716+ assert (
3717+ approvals_counter .last_content_review_status
3718+ == AddonApprovalsCounter .CONTENT_REVIEW_STATUSES .PASS
3719+ )
37013720 assert self .check_log_count (amo .LOG .CONFIRM_AUTO_APPROVED .id ) == 0
37023721 assert self .check_log_count (amo .LOG .APPROVE_REJECTED_LISTING_CONTENT .id ) == 1
37033722 activity = (
@@ -3743,7 +3762,10 @@ def test_reject_listing_content_review(self):
37433762 assert approvals_counter .counter == 0
37443763 assert approvals_counter .last_human_review is None
37453764 assert approvals_counter .last_content_review is None
3746- assert approvals_counter .last_content_review_pass is False
3765+ assert (
3766+ approvals_counter .last_content_review_status
3767+ == AddonApprovalsCounter .CONTENT_REVIEW_STATUSES .FAIL
3768+ )
37473769 assert self .check_log_count (amo .LOG .REJECT_LISTING_CONTENT .id ) == 1
37483770 activity = (
37493771 ActivityLog .objects .for_addons (self .addon )
@@ -3800,7 +3822,10 @@ def test_reject_listing_content_review_with_policies(self):
38003822 assert approvals_counter .counter == 0
38013823 assert approvals_counter .last_human_review is None
38023824 assert approvals_counter .last_content_review is None
3803- assert approvals_counter .last_content_review_pass is False
3825+ assert (
3826+ approvals_counter .last_content_review_status
3827+ == AddonApprovalsCounter .CONTENT_REVIEW_STATUSES .FAIL
3828+ )
38043829 assert self .check_log_count (amo .LOG .REJECT_LISTING_CONTENT .id ) == 1
38053830 activity = (
38063831 ActivityLog .objects .for_addons (self .addon )
0 commit comments