old app fails tests, runs ok

1 view
Skip to first unread message

Javier Guerra Giraldez

unread,
Jul 13, 2011, 12:35:47 PM7/13/11
to django...@googlegroups.com
Hi,

I'm having a very weird problem, hope somebody can shed some light.

some time ago, I developed an internal app at my officeIt using Django
1.1 (final), and it has been running with very few issues, on a small
virtual machine.

Now i have to do some non-trivial changes, so i set up a Virtualenv on
my desktop with Django 1.1 and Python 2.6.6 (the server uses 2.6.2).
if i try with `manage runserver`, it seems to work pretty well.

but it refuses to pass the tests. to be precise, the test
client.login() returns True, but the first request to a
`@login_required` view responds with a 302 => login, as if it wasn't
logged in. the user and password are ok, changing either makes
client.login() return False

i tried on the server itself, and all tests pass OK. Thinking it
might be a different version of the mysql libraries, i changed the
settings.py to use sqlite3. much faster, but fails in exactly the
same way. Also, using Python 2.6.6 or 2.7 doesn't make any
difference.

what else can i try? was there any dependency that i might be missing?

--
Javier

Javier Guerra Giraldez

unread,
Jul 14, 2011, 11:00:42 AM7/14/11
to django...@googlegroups.com
Ok, error fixed.

the issue was documented on ticket #12720, it was a change on Python's
SimpleCookie implementation between 2.6.2 and 2.6.4 that broke the way
the test client creates requests.

updating to 1.1.4 (instead of naïvely asking for 1.1) restored sanity
into the world.

and i learned a few lessons on software curating.

cheers,

--
Javier

Reply all
Reply to author
Forward
0 new messages