Check if test is below base in a URI tree Both args must be URIs in reduced form.
(self, base, test)
| 850 | return authority, path |
| 851 | |
| 852 | def is_suburi(self, base, test): |
| 853 | """Check if test is below base in a URI tree |
| 854 | |
| 855 | Both args must be URIs in reduced form. |
| 856 | """ |
| 857 | if base == test: |
| 858 | return True |
| 859 | if base[0] != test[0]: |
| 860 | return False |
| 861 | prefix = base[1] |
| 862 | if prefix[-1:] != '/': |
| 863 | prefix += '/' |
| 864 | return test[1].startswith(prefix) |
| 865 | |
| 866 | |
| 867 | class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr): |
no test coverage detected