

def test_unique_constraint(self):
    "Can't have two versions of same product with same version number."
    pv = self.F.ProductVersionFactory.create()
    new = self.F.ProductVersionFactory.build(product=pv.product, version=pv.version)
    with self.assertRaises(ValidationError):
        new.full_clean()

dataset/ETHPy150Open mozilla/moztrap/tests/model/core/models/test_productversion.py ProductVersionTest.test_unique_constraint/original