Opened 10 years ago

Closed 10 years ago

#10226 closed (fixed)

dango.test.client.Client raise a value error when used against the admin with a get parameter

Reported by: Batiste Bieler Owned by: nobody
Component: contrib.admin Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no



I have this problem when I want to test my admin application:

Hello, I have the same error with this test:

from django.test import TestCase

from datetime import datetime

class PostBugTestCase(TestCase):

    fixtures = ['tests.json']

    def test_stuff(self):

        from django.test.client import Client

        c = Client()

        data = {'question':'test', 'pub_date'}

        print c.login(username='batiste', password='b')

        response ='/admin/toto/poll/add/?toto=true', data)

        self.assertRedirects(response, '/admin/toto/poll/')

>>> ./manage test
ValueError: invalid literal for int() with base 10: 'add/?toto=true'

I use the Poll model from the tutorial to show the problem.

Change History (4)

comment:1 Changed 10 years ago by Karen Tracey

I cannot recreate this. What version of Django are you using exactly: released 1.0, 1.0.2, current 1.0.X branch, current trunk?

Is there really no traceback included with the ValueError?

comment:2 Changed 10 years ago by Batiste Bieler

I use the 1.0.2 released version. I will try with the trunk to see if it's fixed. Could I paste the traceback here?

comment:3 Changed 10 years ago by Karen Tracey

The traceback would be useful. Put it in {{{ }}} to prevent messed up formatting.

comment:4 Changed 10 years ago by Batiste Bieler

Resolution: fixed
Status: newclosed

I tried with the trunk and the test pass. Sorry to not have checked before.

Note: See TracTickets for help on using tickets.
Back to Top