class_docstr: Test class for the BoxApp
docstr: BoxApp - Keyfile Validation, Bad JSON
docstr_tok: ["BoxApp","-","Keyfile","Validation",",","Bad","JSON"]
code: def test_keyfile_validator_bad_json(self, cred_mock):
      """BoxApp - Keyfile Validation, Bad JSON"""
      validation_function = self._app.required_auth_info()["keyfile"][
          "format"
      ]
      mocker = mock_open(read_data="invalid json")
      with patch("builtins.open", mocker):
          assert_false(validation_function("fakepath"))
          cred_mock.assert_not_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 6 for calling the TestBoxApp obj's underlying member method code with example usage: obj.test_keyfile_validator_bad_json(cred_mock) without return types