tests.py 文件源码

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

项目:django-route 作者: vinayinvicible 项目源码 文件源码
def test_proxy_router_enabled(client, admin_client, router, destination):
    with override_settings(ENABLE_PROXY_ROUTING=True):
        router.action = 'proxy'
        router.save()

        response = client.get(router.source)
        assert response.status_code == 200
        assert_string_equal(response.content, 'home')

        response = admin_client.get(router.source)
        assert response.status_code == 200
        assert_string_equal(response.content, 'destination')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号