Skip to content
Permalink
Browse files

Better test IF there is actually an empty table created

  • Loading branch information
rduivenvoorde committed Nov 17, 2020
1 parent 4f3a080 commit 40ebdc8d040ae0594983ebf80d4f99b8046e4623
Showing with 6 additions and 0 deletions.
  1. +6 −0 tests/src/python/test_provider_oracle.py
@@ -827,6 +827,12 @@ def testCreateEmptyLayer(self):
exporter = QgsVectorLayerExporter(uri=uri, provider='oracle', fields=QgsFields(), geometryType=QgsWkbTypes.Type.Point, crs=QgsCoordinateReferenceSystem(4326), overwrite=True)
self.assertEqual(exporter.errorCount(), 0)
self.assertEqual(exporter.errorCode(), 0)
# check IF there is an empty table (will throw error if the EMPTY_LAYER table does not excist)
self.execSQLCommand('SELECT count(*) FROM "QGIS"."EMPTY_LAYER"')
vl = QgsVectorLayer(
self.dbconn + ' sslmode=disable table="QGIS"."EMPTY_LAYER" sql=',
'test', 'oracle')
self.assertTrue(vl.isValid())
# cleanup
self.execSQLCommand('DROP TABLE "QGIS"."EMPTY_LAYER"')
self.execSQLCommand("DELETE FROM user_sdo_geom_metadata where TABLE_NAME='EMPTY_LAYER'")

0 comments on commit 40ebdc8

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