Re: Django testing and unique=True

2011-12-13 Thread Karen Tracey
On Tue, Dec 13, 2011 at 8:33 AM, Acruax wrote: > Hi, > I have a problem with model testing. My test fails with error: > IntegrityError: duplicate key value violates unique constraint > "catalog_name_key" > DETAIL: Key (name)=(test_catalog1) already exists. > > I have

Django testing and unique=True

2011-12-13 Thread Acruax
Hi, I have a problem with model testing. My test fails with error: IntegrityError: duplicate key value violates unique constraint "catalog_name_key" DETAIL: Key (name)=(test_catalog1) already exists. I have unique=True on name field. class CatalogTestCase(unittest.TestCase): def