Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
jakimowb authored and nyalldawson committed May 12, 2023
1 parent 64c0f4a commit 2191d5c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/src/python/test_qgsvectorlayersaveasdialog.py
Expand Up @@ -21,20 +21,21 @@ class TestQgsMapCanvas(TestCase):

def testOpenDialog(self):

layer = QgsVectorLayer("Polygon?crs=epsg:4326&field=fldtxt:string", "layer", "memory")
layer = QgsVectorLayer("Polygon?crs=epsg:4326&field=text:string", "layer", "memory")

with edit(layer):
f = QgsFeature(layer.fields())
f.setAttribute('test', 'foo')
f.setAttribute('text', 'foo')
layer.addFeature(f)

f = QgsFeature(layer.fields())
f.setAttribute('test', 'bar')
f.setAttribute('text', 'bar')
layer.addFeature(f)

layer.select(layer.allFeatureIds()[0])
options = QgsVectorLayerSaveAsDialog.SelectedOnly | QgsVectorLayerSaveAsDialog.Metadata
d = QgsVectorLayerSaveAsDialog(layer, options=options)
self.assertIsInstance(d, QgsVectorLayerSaveAsDialog)
d.setOnlySelected(True)
self.assertTrue(d.onlySelected())

Expand Down

0 comments on commit 2191d5c

Please sign in to comment.