On Sep 2, 9:49 am, girish shabadimath <girishmss.1...@gmail.com>
wrote:
> actually i wanted to access values from database and use those values in url
> unittesting,,,
>
> like:
> response = self.client.get('def/defect/', {'*ID*':*id*})
> self.failUnlessEqual(response.status_code, 200)
>
> how to get id from database..?,,,and also i want this test to be done for
> each id in database,,hw to proceed..?
>
> ,,,this may sound silly but plz help..!!!!

Have you read the extensive documentation on how to make a query
against the database?
http://docs.djangoproject.com/en/1.2/topics/db/queries/

However, I must say that it seems very odd to want to test requesting
a URL against every ID in the database. That's not how unit testing
works. Test with a representative sample of data, that's what fixtures
are for.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to