Skip to content
Permalink
Browse files

Add some tests

  • Loading branch information
pblottiere committed Sep 5, 2017
1 parent 8a17a60 commit 76b2b8eed3d3ac4442e67e799e9d8962751d5588
Showing with 10 additions and 0 deletions.
  1. +10 −0 tests/src/python/test_provider_postgres.py
@@ -765,6 +765,16 @@ def testReadExtentOnView(self):

self.assertEqual(vl2.extent(), customExtent)

# but a force update on extent should allow retrieveing the data
# provider extent
vl2.updateExtents()
vl2.readLayerXml(elem, QgsReadWriteContext())
self.assertEqual(vl2.extent(), customExtent)

vl2.updateExtents(force=True)
vl2.readLayerXml(elem, QgsReadWriteContext())
self.assertEqual(vl2.extent(), originalExtent)

def testReadExtentOnTable(self):
# vector layer based on a standard table
vl0 = QgsVectorLayer(self.dbconn + ' sslmode=disable key=\'pk\' srid=4326 type=POLYGON table="qgis_test"."some_poly_data" (geom) sql=', 'test', 'postgres')

0 comments on commit 76b2b8e

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