MCPcopy Create free account
hub / github.com/EasyIME/PIME / test_slashes

Method test_slashes

python/python3/tornado/test/web_test.py:551–561  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

549 )
550
551 def test_slashes(self):
552 # Slashes may be escaped to appear as a single "directory" in the path,
553 # but they are then unescaped when passed to the get() method.
554 self.assertEqual(
555 self.fetch_json("/slashes/foo/bar"),
556 dict(path="/slashes/foo/bar", path_args=["foo", "bar"], args={}),
557 )
558 self.assertEqual(
559 self.fetch_json("/slashes/a%2Fb/c%2Fd"),
560 dict(path="/slashes/a%2Fb/c%2Fd", path_args=["a/b", "c/d"], args={}),
561 )
562
563 def test_error(self):
564 # Percent signs (encoded as %25) should not mess up printf-style

Callers

nothing calls this directly

Calls 1

fetch_jsonMethod · 0.95

Tested by

no test coverage detected