Hi all, I am about to writing the django unittest, so I need to login to the django admin page to test my unittest. I send the POST request to / admin/ by using the admin account(username/password). Then the response from the admin page return like the password/username are invalid. can't login.
I use the mysqlite and then create admin user in the DB. The page that im gonna test is needed an admin session id, so i need to login to django admin page first, then i can test my unittest. class LogReportTest(unittest.TestCase): def setUp(self): self.client = Client() self.username = 'admin' self.email = '[EMAIL PROTECTED]' self.password = 'welcome' create_admin_user(self.username, self.email, self.password) param = {'username':Self.username,'password':Self.password} response = self.client.post('/admin/',param) print response any ideas? Regards, ajink09 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---