@@ -46,7 +46,7 @@ def test_successful_account_details_retrieval(self, mock_permission, mock_servic
4646 # Assert
4747 mock_service .assert_called_once_with (account_id = VALID_ACCOUNT_ID )
4848 assert response .status_code == 200
49- assert response .json () == {"bccr_trading_name" : "Test Account Inc." }
49+ assert response .json () == {"bccr_trading_name" : "Test Account Inc." , "has_remote_bccr_errors" : False }
5050
5151 @patch (VALIDATE_PERMISSION_PATH )
5252 def test_invalid_account_id_format (self , mock_permission ):
@@ -68,7 +68,7 @@ def test_empty_account_details_response(self, mock_permission, mock_service):
6868 response = self .client .get (self ._get_endpoint_url (VALID_ACCOUNT_ID , COMPLIANCE_REPORT_VERSION_ID ))
6969 # Assert
7070 assert response .status_code == 200
71- assert response .json () == {"bccr_trading_name" : None }
71+ assert response .json () == {"bccr_trading_name" : None , "has_remote_bccr_errors" : False }
7272
7373 @patch (BCCR_SERVICE_PATH )
7474 @patch (VALIDATE_PERMISSION_PATH )
@@ -79,12 +79,12 @@ def test_service_error_handling(self, mock_permission, mock_service):
7979 # Act
8080 response = self .client .get (self ._get_endpoint_url (VALID_ACCOUNT_ID , COMPLIANCE_REPORT_VERSION_ID ))
8181 # Assert
82- message = "The system cannot connect to the external application. Please try again later. If the problem persists, contact GHGRegulator@gov.bc.ca for help."
83- assert_error_response (
84- response ,
85- status_code = 400 ,
86- message = message ,
87- )
82+ assert response . status_code == 200
83+
84+ response_json = response . json ()
85+
86+ assert response_json [ "bccr_trading_name" ] is None
87+ assert response_json [ "has_remote_bccr_errors" ] is True
8888
8989 @patch (BCCR_SERVICE_PATH )
9090 @patch (VALIDATE_PERMISSION_PATH )
@@ -104,7 +104,8 @@ def test_account_details_with_null_type_of_account_holder(self, mock_permission,
104104 mock_service .assert_called_once_with (account_id = VALID_ACCOUNT_ID )
105105 assert response .status_code == 200
106106 assert response .json () == {
107- "bccr_trading_name" : "Test Account Inc."
107+ "bccr_trading_name" : "Test Account Inc." ,
108+ "has_remote_bccr_errors" : False ,
108109 } # Should still work with null type_of_account_holder
109110
110111 @patch (BCCR_SERVICE_PATH )
0 commit comments