Re: Generic relations and unit tests.

2009-04-16 Thread Stavros
Is there some way I can empty the contenttypes table before the fixtures are loaded and have django load them normally? That would take care of this problem, as it would mean that the proper contenttypes would get loaded from the fixture. Unfortunately, I have not been able to find a way to run

Re: Generic relations and unit tests.

2009-04-11 Thread Stavros
I agree with you on this, but it is often impractical due to the volume of the data required. I have this data already in my database, I shouldn't have to spend a few days moving it to the tests file... Fixtures are a quick way to import your data to the test DB without having to recreate

Re: Generic relations and unit tests.

2009-04-10 Thread Malcolm Tredinnick
On Sat, 2009-04-11 at 08:47 +0800, Russell Keith-Magee wrote: > On Sat, Apr 11, 2009 at 5:53 AM, Poromenos wrote: > > > > Hello, > > I created a model that has a ForeignKey to ContentType, but now I > > can't use my test fixtures, since the IDs they point to are random > >

Re: Generic relations and unit tests.

2009-04-10 Thread Russell Keith-Magee
On Sat, Apr 11, 2009 at 5:53 AM, Poromenos wrote: > > Hello, > I created a model that has a ForeignKey to ContentType, but now I > can't use my test fixtures, since the IDs they point to are random > every time the test database is created. I can't dump the contenttypes >

Generic relations and unit tests.

2009-04-10 Thread Poromenos
Hello, I created a model that has a ForeignKey to ContentType, but now I can't use my test fixtures, since the IDs they point to are random every time the test database is created. I can't dump the contenttypes data because then I get many duplicate inserts, since Django rebuilds them every time