【发布时间】:2016-04-16 08:56:09
【问题描述】:
我知道我可以这样做
self.client.get('/path/', {'query': 'abs'}, secure=True)
在最近的版本中,但它在 django 1.6 中不起作用,因为参数 'secure' 是在 1.7 中添加的。我如何能够在 1.6 版本中实现这一点?
【问题讨论】:
标签: python django testing https
我知道我可以这样做
self.client.get('/path/', {'query': 'abs'}, secure=True)
在最近的版本中,但它在 django 1.6 中不起作用,因为参数 'secure' 是在 1.7 中添加的。我如何能够在 1.6 版本中实现这一点?
【问题讨论】:
标签: python django testing https
在这里你可以找到一个技巧http://codeinthehole.com/writing/testing-https-handling-in-django/希望对你有帮助
【讨论】: