Accessing Django test client in setUpClass

2015-01-22 Thread Nicole Harris
I just posted this on Stack Overflow and then realised I might have more luck here. Basically, I'd like to know if I can access self.client inside setUpClass(cls) when setting up a Django test: http://stackoverflow.com/questions/28084683/accessing-django-test-client-in-setupclass If anybody has

Validation on two user foreign keys

2015-01-28 Thread Nicole Harris
Hi All, I have a model called 'Friendship' that includes two foreign keys to User. One is the 'initiator' of the Friendship, the other the 'recipient'. I want to make sure the Friendship only exists once regardless of who is the recipient and who is the initiator. Any thoughts on the best way

Registering a stand-alone test app

2015-02-10 Thread Nicole Harris
Hi All, I have an app in my root folder named 'bdd'. It contains an (empty) models.py as well as some files for running behave tests. I have added this app to INSTALLED_APPS in my settings.py so that I can run the tests with the Django Behave