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')
评论列表
文章目录