test_cookies.py 文件源码

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

项目:deb-python-falcon 作者: openstack 项目源码 文件源码
def test_response_base_case(client):
    result = client.simulate_get('/')

    cookie = result.cookies['foo']
    assert cookie.name == 'foo'
    assert cookie.value == 'bar'
    assert cookie.domain == 'example.com'
    assert cookie.http_only

    # NOTE(kgriffs): Explicitly test for None to ensure
    # falcon.testing.Cookie is returning exactly what we
    # expect. Apps using falcon.testing.Cookie can be a
    # bit more cavalier if they wish.
    assert cookie.max_age is None
    assert cookie.expires is None

    assert cookie.path == '/'
    assert cookie.secure
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号