#NEWLINE# @ mock . patch . object ( EmailApprovableSanctionTestClass , '_send_approval_request_email' ) #NEWLINE# @ mock . patch . object ( EmailApprovableSanctionTestClass , '_email_template_context' ) #NEWLINE# def test_notify_authorizer( self , mock_get_email_template_context , mock_send_approval_email ) : #NEWLINE# #INDENT# mock_get_email_template_context . return_value = 'context' #NEWLINE# reg = self . sanction . _get_registration ( ) #NEWLINE# self . sanction . _notify_authorizer ( self . user , reg ) #NEWLINE# mock_get_email_template_context . assert_called_once_with ( mock_send_approval_email . user , reg , is_authorizer = True ) #NEWLINE# mock_send_approval_email . assert_called_once_with ( self . user , 'authorizer' , 'context' )