V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
26huitailang
V2EX  ›  Python

webpy 自动化测试,每次 request 后都会新建一个 session。

  •  
  •   26huitailang · 2016-03-15 15:58:21 +08:00 · 2497 次点击
    这是一个创建于 2971 天前的主题,其中的信息可能已经有所发展或是发生改变。
    在 Learn Python By the Hard Way EX52 中,写了个小的文字游戏,但是卡在 app_tests.py 那儿了,我用 nosetests 及作者的 request 方式去测试程序,发现每次 session.room 都是默认值,最后发现是因为每次 request 都新建了一个 session ,请问怎么在自动化测试中让每次访问都保持同一个 session ,谢谢!
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2230 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 76ms · UTC 04:47 · PVG 12:47 · LAX 21:47 · JFK 00:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.