Skip to content
Permalink
Browse files

fix test

  • Loading branch information
nyalldawson committed Nov 2, 2016
1 parent 3a59674 commit e3a608365f612fbc58e88255ec4f136cd609d015
Showing with 3 additions and 3 deletions.
  1. +3 −3 tests/src/python/test_provider_postgres.py
@@ -492,10 +492,10 @@ def testConstraintOverwrite(self):
self.assertTrue(vl.isValid())

self.assertTrue(vl.dataProvider().fieldConstraints(0) & QgsFieldConstraints.ConstraintNotNull)
self.assertTrue(vl.fields().at(0).constraints() & QgsFieldConstraints.ConstraintNotNull)
self.assertTrue(vl.fields().at(0).constraints().constraints() & QgsFieldConstraints.ConstraintNotNull)

# add a constraint at the layer level
vl.setFieldConstraints(0, QgsFieldConstraints.ConstraintUnique)
vl.setFieldConstraint(0, QgsFieldConstraints.ConstraintUnique)

# should be no change at provider level
self.assertTrue(vl.dataProvider().fieldConstraints(0) & QgsFieldConstraints.ConstraintNotNull)
@@ -505,7 +505,7 @@ def testConstraintOverwrite(self):
self.assertTrue(vl.fieldConstraints(0) & QgsFieldConstraints.ConstraintNotNull)
# ...in addition to layer level constraint
self.assertTrue(vl.fields().at(0).constraints().constraints() & QgsFieldConstraints.ConstraintUnique)
self.assertTrue(vl.fieldConstraints(0) & QgsFieQgsFieldConstraintsld.ConstraintUnique)
self.assertTrue(vl.fieldConstraints(0) & QgsFieldConstraints.ConstraintUnique)

# See http://hub.qgis.org/issues/15188
def testNumericPrecision(self):

0 comments on commit e3a6083

Please sign in to comment.
You can’t perform that action at this time.