Skip to content
Permalink
Browse files

test with correct uniquevalue

  • Loading branch information
signedav committed Oct 15, 2018
1 parent 963fdd5 commit 7ce06e62656d85fd9f0f1c25c20958813652f21b
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/src/python/test_qgsvectorlayerutils.py
@@ -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 """

0 comments on commit 7ce06e6

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