class_docstr: Tests for `ClientFeatureFlagsMiddleware`.
class_docstr_tok: ["Tests","for","`","ClientFeatureFlagsMiddleware","`","."]
code: def test_header_with_json_not_dict(self):
      app = client_feature_flags.ClientFeatureFlagsMiddleware(
          self._echo_app
      )
      server = werkzeug_test.Client(app, wrappers.Response)
  
      with self.assertRaisesRegex(
          errors.InvalidArgumentError, "cannot be decoded to a dict"
      ):
          response = server.get(
              "",
              headers=[
                  (
                      "X-TensorBoard-Feature-Flags",
                      '["not", "a", "dict"]',
                  )
              ],
          )
  
imports: import json
  from werkzeug import test
  from werkzeug import wrappers
  from tensorboard import context
  from tensorboard import errors
  from tensorboard import test
  from tensorboard.backend import client_feature_flags
label_desc: Use image node_id 13 for calling the ClientFeatureFlagsMiddlewareTest obj's underlying member method code with example usage: obj.test_header_with_json_not_dict() without return types