Skip to content

Commit

Permalink
test with correct uniquevalue
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Oct 15, 2018
1 parent 963fdd5 commit 7ce06e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/src/python/test_qgsvectorlayerutils.py
Expand Up @@ -293,6 +293,10 @@ def testCreateFeature(self):
self.assertEqual(f.attributes(), ['test_5', 131, NULL])
layer.setDefaultValueDefinition(1, QgsDefaultValue(None))

# test with manually correct unique constraint
f = QgsVectorLayerUtils.createFeature(layer, attributes={0: 'test_1', 1: 132})
self.assertEqual(f.attributes(), ['test_5', 132, NULL])

def testDuplicateFeature(self):
""" test duplicating a feature """

Expand Down

0 comments on commit 7ce06e6

Please sign in to comment.