为视图编写 Django 单元测试
有人有编写良好视图测试的好教程/示例吗?我找到的大部分内容都是 2008 年中期的,但没什么帮助。
Does anyone have a good tute/example of writing good tests for views? Most of the stuff I've been finding was from mid 2008 which is only a little helpful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Alex Gaynor 前几天写了一些关于这个主题的提示:
开始在 Django 中进行测试
Alex Gaynor wrote some tips about this very subject just the other day:
Getting started with testing in Django
我不确定这是否正是您正在寻找的内容,但我一直在研究同一主题并发现此示例测试代码非常有帮助。
http://bitbucket.org/ubernostrum/django-注册/src/tip/registration/tests/views.py
I'm not sure if this is exactly what you're looking for, but I've been looking into this same topic and found this example test code very helpful.
http://bitbucket.org/ubernostrum/django-registration/src/tip/registration/tests/views.py