【问题标题】:How can I make an https request using django 1.6 test client?如何使用 django 1.6 测试客户端发出 https 请求?
【发布时间】: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


    【解决方案1】:

    在这里你可以找到一个技巧http://codeinthehole.com/writing/testing-https-handling-in-django/希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-21
      • 2018-03-09
      • 1970-01-01
      • 2014-11-03
      • 2020-09-02
      • 2014-03-15
      相关资源
      最近更新 更多