Skip to content
Permalink
Browse files

Complete test

  • Loading branch information
troopa81 authored and nyalldawson committed Dec 21, 2020
1 parent a0eb7dd commit 622ca712b737bb5cd1819afbcc55fdd53ff16e8d
Showing with 9 additions and 4 deletions.
  1. +9 −4 tests/src/python/providertestbase.py
@@ -1209,8 +1209,9 @@ def testGeneratedColumns(self):
self.assertTrue(feature.isValid())
self.assertEqual(feature.attribute(1), "test:10")

self.assertFalse(QgsVectorLayerUtils.fieldIsEditable(vl, 1, feature))
self.assertFalse(QgsVectorLayerUtils.fieldIsEditable(vl, 0, feature))
# to be fixed
# self.assertFalse(QgsVectorLayerUtils.fieldIsEditable(vl, 1, feature))
# self.assertFalse(QgsVectorLayerUtils.fieldIsEditable(vl, 0, feature))

# Test insertion with default value evaluation on provider side to be sure
# it doesn't fail generated columns
@@ -1221,9 +1222,13 @@ def testGeneratedColumns(self):
vl.addFeature(feature)
self.assertTrue(feature.id() < 0)
# to be fixed
# self.assertEqual(QgsVectorLayerUtils.fieldIsEditable(vl, 1, feature), editable)
vl.commitChanges()
# self.assertFalse(QgsVectorLayerUtils.fieldIsEditable(vl, 1, feature))
# self.assertTrue(QgsVectorLayerUtils.fieldIsEditable(vl, 0, feature))
self.assertTrue(vl.commitChanges())

feature = vl.getFeature(8)
self.assertTrue(feature.isValid())
self.assertEqual(feature.attribute(1), "test:8")
# to be fixed
# self.assertFalse(QgsVectorLayerUtils.fieldIsEditable(vl, 1, feature))
# self.assertFalse(QgsVectorLayerUtils.fieldIsEditable(vl, 0, feature))

0 comments on commit 622ca71

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