Hi,
Thanks for the help but still I am not able to login in my test
client..

here is the code:

from django.test import TestCase
from django.test.client import Client

class IndustryTest(TestCase):
    fixtures = ['/fixtures/initial_data.xml']


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

test case is as follows:
Loading 'initial_data' fixtures...
Installing xml fixture 'initial_data' from '/home/laspal/work/ibms/../
ibms/crm/fixtures'.
Installing xml fixture 'initial_data' from absolute path.
Installed 207 object(s) from 2 fixture(s)

response --------> Your username and password didn't match. Please try
again.

and my xml file is contain the username and password :
<django-objects version="1.0">
<object pk="1" model="auth.user">
<field type="CharField" name="username">laspal</field>
<field type="CharField" name="first_name"/>
<field type="CharField" name="last_name"/>
<field type="CharField" name="email">[EMAIL PROTECTED]</field>
<field type="CharField" name="password">
sha1$f7594$ec2e69b5197b6b26d14a832e4873ab6838a8fe9a
</field>

Can any one tell me what I am doing wrong here as I am having a had
time to figure it out...
and if I do user = User.objects.get( username ='laspal') print user
gives me correct value
but dont know why I am, not able to login..

thanks for the help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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