(self)
| 793 | self.assertEqual(escape_path(arg), result) |
| 794 | |
| 795 | def test_request_path(self): |
| 796 | # with parameters |
| 797 | req = urllib.request.Request( |
| 798 | "http://www.example.com/rheum/rhaponticum;" |
| 799 | "foo=bar;sing=song?apples=pears&spam=eggs#ni") |
| 800 | self.assertEqual(request_path(req), |
| 801 | "/rheum/rhaponticum;foo=bar;sing=song") |
| 802 | # without parameters |
| 803 | req = urllib.request.Request( |
| 804 | "http://www.example.com/rheum/rhaponticum?" |
| 805 | "apples=pears&spam=eggs#ni") |
| 806 | self.assertEqual(request_path(req), "/rheum/rhaponticum") |
| 807 | # missing final slash |
| 808 | req = urllib.request.Request("http://www.example.com") |
| 809 | self.assertEqual(request_path(req), "/") |
| 810 | |
| 811 | def test_path_prefix_match(self): |
| 812 | pol = DefaultCookiePolicy() |
nothing calls this directly
no test coverage detected