test_fixtures.py 文件源码

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

项目:maas 作者: maas 项目源码 文件源码
def test_removes_https_proxy_from_environment(self):
        https_proxy = factory.make_name("https-proxy")
        initial = EnvironmentVariable("https_proxy", https_proxy)
        self.useFixture(initial)
        # On entry, https_proxy is removed from the environment.
        with ProxiesDisabledFixture():
            self.assertNotIn("https_proxy", os.environ)
        # On exit, http_proxy is restored.
        self.assertEqual(https_proxy, os.environ.get("https_proxy"))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号