Pylons / Pylons/webtest

Invalid testapp.cookies after testapp.set_cookie()

Open
#171 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
346
Forks
113
PR merge metrics
No merged PRs in 30d

Description

Dictionary testapp.cookies has invalid value after call testapp.set_cookie():

>>> from webtest import TestApp
>>> from webtest.debugapp import debug_app
>>> testapp = TestApp(debug_app)
>>> name, val = 'c', '123'
>>> testapp.set_cookie(name, val)
>>> c_val = testapp.cookies.get(name)
>>> val == c_val
False
>>> val
'123'
>>> c_val
'"123"'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the example with TestApp, debug_app, and testapp.set_cookie(), then trace how the cookie is stored and returned through testapp.cookies. Add a regression test for the shown values and consider the issue done when retrieving the cookie returns the value passed to set_cookie().

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.