(self, url: str)
| 893 | return any(cls.__hostnameHasDomain(hostname, d) for d in domain_or_domains) |
| 894 | |
| 895 | def __assertUrlAllowed(self, url: str) -> None: |
| 896 | o = urllib.parse.urlparse(url) |
| 897 | assert o.hostname is not None |
| 898 | if o.hostname == self.__hostname: |
| 899 | prefixes = [self.__prefix, self.__graphql_prefix, "/api/", "/login/oauth"] |
| 900 | assert o.path.startswith(tuple(prefixes)), o.path |
| 901 | assert o.port == self.__port, o.port |
| 902 | else: |
| 903 | assert self.__hostnameHasDomain(o.hostname, self.__domains), o.hostname |
| 904 | |
| 905 | def __customConnection(self, url: str) -> HTTPRequestsConnectionClass | HTTPSRequestsConnectionClass | None: |
| 906 | cnx: HTTPRequestsConnectionClass | HTTPSRequestsConnectionClass | None = None |
no test coverage detected