class_docstr: Test class for the BoxApp
docstr: BoxApp - Keyfile Validation, Failure
docstr_tok: ["BoxApp","-","Keyfile","Validation",",","Failure"]
code: def test_keyfile_validator_failure(self, cred_mock):
      """BoxApp - Keyfile Validation, Failure"""
      validation_function = self._app.required_auth_info()["keyfile"][
          "format"
      ]
      cred_mock.return_value = False
      mocker = mock_open(read_data=json.dumps({"test": "keydata"}))
      with patch("builtins.open", mocker):
          assert_false(validation_function("fakepath"))
          cred_mock.assert_called()
  
imports: import json
  import os
  from boxsdk.exception import BoxException
  from mock import call, Mock, mock_open, patch
  from moto import mock_ssm
  from nose.tools import assert_equal, assert_false, assert_count_equal, assert_true
  import requests
  from streamalert.apps._apps.box import BoxApp
  from tests.unit.streamalert.apps.test_helpers import get_event, put_mock_params
  from tests.unit.streamalert.shared.test_config import get_mock_lambda_context
label_desc: Use image node_id 5 for calling the TestBoxApp obj's underlying member method code with example usage: obj.test_keyfile_validator_failure(cred_mock) without return types