Hi,
I have  created initial_data.xml using dumpdata and
"""manage.py loaddata initial_data.xml""" gives me no error.
but still  I am not able to login using setUp().. and this is
essential  as all my views functions required login..

here is my test file:

import unittest

from django.test import TestCase

class IndustryTest(TestCase):

    def setUp(self):
        self.client = Client()
        response =self.client.post('/ibms/login/',
{'username':'laspal', 'passwords':'abcd'})
        print response

I am still getting the error."""Your username and password didn't
match"""
Please help me out as I have to write lots of test cases for my view
functions.

Thanks

On Jul 1, 7:12 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> > How do I create username and password for the test database.
>
> What I do is either create a test user on SetUp(), or put that
> username inside the "initial_data" fixture, which loads automatically
> when Django creates the test DB...
>
> HTH,
>
> Carlos
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to