Hi.

Fixtures doesn't need to be 'fixed'. You can create some fresh
fixtures with
a db dump. However, your code shouldn't break by changing an entry,
changing tables ect, might give problems, but that shouldn't be
something
you do everyday on a production site anyways. That said, some problems
will only show in some cases, and it's impossible to test for every
case, as
you probably will miss some special cases anyways.
The key to making good tests is not only the tests themselves, but
also
having a good data set to use for the testing.

So I guess the quick answer, is to simply make a db dump
and use that for testing. It should be fairly easy to create a new
fixture and
if needed you can make a new dump every day/week.

~Jakob

On 26 Mar., 21:35, MikeL <michael.la...@gmail.com> wrote:
> I've noticed that the "/manage.py test" script creates a temporary
> database and requires fixtures to populate data for testing. But what
> about when tests involving large amounts of data that can be changed
> and we need to test our views by using that data? If someone
> accidentally breaks a view by just changing an entry in a database how
> can we test for this? If we just use fixtures, then the test data will
> always be valid.
>
> I guess what we need to know is, can we setup the testing to use the
> live database (May have to disable fixtures for instance)? Also if we
> do that, can we prevent the changes made from unit tests from being
> permanent (create user account each time for example)?
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to