Re: testing unique_together IntegrityError

2012-11-10 Thread Mike Dewhirst
On 11/11/2012 4:45pm, Mike Dewhirst wrote: Can anyone help with some unit test guidance please? How can I trap an IntegrityError in a test to prove unique_together is working? I'm modelling a company and multiple divisions. A solo division doesn't need a division.name so I'm allowing it to be b

testing unique_together IntegrityError

2012-11-10 Thread Mike Dewhirst
Can anyone help with some unit test guidance please? How can I trap an IntegrityError in a test to prove unique_together is working? I'm modelling a company and multiple divisions. A solo division doesn't need a division.name so I'm allowing it to be blank. It's __unicode__() method returns