class_docstr: Tests for `PathPrefixMiddleware`.
class_docstr_tok: ["Tests","for","`","PathPrefixMiddleware","`","."]
code: def test_bad_path_prefix_with_trailing_slash(self):
      with self.assertRaises(ValueError) as cm:
          path_prefix.PathPrefixMiddleware(self._echo_app, "/hmm/")
      msg = str(cm.exception)
      self.assertIn("must not end with slash", msg)
      self.assertIn(repr("/hmm/"), msg)
  
file_path: tensorboard/tensorboard/backend/path_prefix_test.py
imports: import json
  import werkzeug
  from werkzeug import test
  from tensorboard import errors
  from tensorboard import test
  from tensorboard.backend import path_prefix
label_desc: Use image node_id 4 for calling the PathPrefixMiddlewareTest obj's underlying member method code with example usage: obj.test_bad_path_prefix_with_trailing_slash() without return types