class_docstr: Tests for `SecurityValidatorMiddleware`.
class_docstr_tok: ["Tests","for","`","SecurityValidatorMiddleware","`","."]
code: def test_validate_csp_multiple_csp_headers(self):
      base_headers = create_headers(
          content_type="text/html; charset=UTF-8",
          content_security_policy=(
              "script-src * 'sha256-foo';" "style-src http://google.com"
          ),
      )
      base_headers.add(
          "Content-Security-Policy",
          "default-src 'self';script-src 'nonce-bar';object-src *",
      )
  
      self.make_request_and_maybe_assert_warn(
          base_headers,
          "\n".join(
              [
                  "Illegal Content-Security-Policy for script-src: *",
                  "Illegal Content-Security-Policy for style-src: http://google.com",
                  "Illegal Content-Security-Policy for script-src: 'nonce-bar'",
                  "Illegal Content-Security-Policy for object-src: *",
              ]
          ),
      )
  
file_path: tensorboard/tensorboard/backend/security_validator_test.py
imports: from unittest import mock
  import werkzeug
  from werkzeug import test
  from werkzeug.datastructures import Headers
  from werkzeug.wrappers import Response
  from tensorboard import test
  from tensorboard.backend import security_validator
  from tensorboard.util import tb_logging
label_desc: Use image node_id 6 for calling the SecurityValidatorMiddlewareTest obj's underlying member method code with example usage: obj.test_validate_csp_multiple_csp_headers() without return types