def test_unique_constraint(self):
        pv = self.F.ProductVersionFactory.create()

        new = self.F.ProductVersionFactory.build(
            product=pv.product, version=pv.version)

        with self.assertRaises(ValidationError):
            new.full_clean()
Can't have two versions of same product with same version number.
dataset/ETHPy150Open mozilla/moztrap/tests/model/core/models/test_productversion.py/ProductVersionTest.test_unique_constraint