test_requests.py 文件源码

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

项目:ruffruffs 作者: di 项目源码 文件源码
def test_cookie_removed_on_expire(self, httpbin):
        s = requests.session()
        s.get(httpbin('cookies/set?foo=bar'))
        assert s.cookies['foo'] == 'bar'
        s.get(
            httpbin('response-headers'),
            params={
                'Set-Cookie':
                    'foo=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT'
            }
        )
        assert 'foo' not in s.cookies
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号