test_authentication.py 文件源码

python
阅读 15 收藏 0 点赞 0 评论 0

项目:txkube 作者: LeastAuthority 项目源码 文件源码
def test_hostname_does_not_resolve(self):
        """
        Specifying a hostname which cannot be resolved to an
        IP address will result in an ``DNSLookupError``.
        """
        with ExpectedException(DNSLookupError, "DNS lookup failed: no results "
                               "for hostname lookup: doesnotresolve."):
            self._authorized_request(
                token="test",
                headers=Headers({}),
                kubernetes_host=b"doesnotresolve"
            )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号