Tuesday, February 28, 2012

Re: Django Unittesting Question.

You need to use the tearDown method to clear any records that you've might create.

On Tue, Feb 28, 2012 at 8:10 AM, Johan <djjordaan@gmail.com> wrote:
Hi. I can see that the setUp method of my TestCase specialization is
being run for each test case. I thought that the test DB is cleared
every time before setUp is called. Is this the case? I'm having a
problem where I am assuring that only one of a certain record will be
in the DB but because the db isn't cleared I end up with two records
and this breaks my code.

Regards

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
George R. C. Silva

Desenvolvimento em GIS
http://geoprocessamento.net
http://blog.geoprocessamento.net

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment