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