Re: Testing with a custom user model as a ForeignKey in Django 1.5

2013-03-28 Thread Felipe Coelho
2013/3/18 Felipe Coelho > 1) Using tests that need the models, but don't actually touch the >> database. This means you can put the model definition inline in the test >> code, so AUTH_USER_MODEL has the right value when the code is run. This >> lets us test validation

Re: Testing with a custom user model as a ForeignKey in Django 1.5

2013-03-18 Thread Felipe Coelho
> > 1) Using tests that need the models, but don't actually touch the > database. This means you can put the model definition inline in the test > code, so AUTH_USER_MODEL has the right value when the code is run. This > lets us test validation conditions, etc, but not hit the database. You >

Re: Testing with a custom user model as a ForeignKey in Django 1.5

2013-03-16 Thread Russell Keith-Magee
On Sat, Mar 16, 2013 at 9:14 PM, Felipe Coelho wrote: > 2013/3/14 Felipe Coelho > >> I'm using Django 1.5 and I'm trying to make an application work with >> any custom user model. >> >> The issue is that I want to be able to test the app as well, but I

Re: Testing with a custom user model as a ForeignKey in Django 1.5

2013-03-16 Thread Felipe Coelho
2013/3/14 Felipe Coelho > I'm using Django 1.5 and I'm trying to make an application work with > any custom user model. > > The issue is that I want to be able to test the app as well, but I > can't find a way to make `ForeignKey` model fields to test correctly > using

Testing with a custom user model as a ForeignKey in Django 1.5

2013-03-13 Thread Felipe Coelho
I'm using Django 1.5 and I'm trying to make an application work with any custom user model. The issue is that I want to be able to test the app as well, but I can't find a way to make `ForeignKey` model fields to test correctly using custom user models. When I run the test case attached below, I