Hey I am able to run the test by using :
class IndustryTest(TestCase):
    fixtures = ['/fixtures/initial_data.xml']

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

    def test_addIndustry( self):
        res = self.client.post('/ibms/login/', {'username':'laspal',
'password':'abcd'})
        url = '/ibms/crm/industries/add/'
        response = self.client.post(url,{ 'name': 'tarams'})
        self.failUnlessEqual( response.status_code, 302)
        industry = Industry.objects.get( name = 'tarams')
        self.failUnlessEqual( industry.name, 'tarams')

So my point is it still  shows response as """Your username and
password didn't match. Please try again"""
but my test is not showing any error as before. I just added the login
res = self.client.post('/ibms/login/', {'username':'laspal',
'password':'abcd'}) to the test_addIndustry functions.

So my doubt is I am doing the correct way.. because I run into some
other problem.
"""function for viewing the list of industry

    def test_view_industry(self):
        res = self.client.post('/ibms/login/', {'username':'laspal',
'password':'abcd'})
        industry = Industry.objects.get(name = 'tarams')
        url = '/ibms/crm/industries/' + str(industry.id) + '/
overview/'
        response = self.client.post(url)
        self.failUnlessEqual( response.status_code, 302)

gives me error saying """Industry matching query does not exist."""
for the test_view_industry function..

Thanks.
--~--~---------~--~----~------------~-------~--~----~
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