Navigation Menu

Skip to content

Commit

Permalink
Fix PG connections API test
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and nyalldawson committed Feb 8, 2021
1 parent def8f3a commit 1ce0503
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/python/test_qgsproviderconnection_postgres.py
Expand Up @@ -216,10 +216,10 @@ def test_postgis_raster_rename(self):
md.saveConnection(conn, 'qgis_test1')

table = self._table_by_name(conn.tables('qgis_test', QgsAbstractDatabaseProviderConnection.Raster), 'Raster1')
self.assertTrue(QgsRasterLayer("PG: %s schema='qgis_test' column='%s' table='%s'" % (conn.uri(), table.geometryColumn(), table.tableName()), 'r1', 'gdal').isValid())
self.assertTrue(QgsRasterLayer("PG: %s dbname='qgis_test' schema='qgis_test' column='%s' table='%s'" % (conn.uri(), table.geometryColumn(), table.tableName()), 'r1', 'gdal').isValid())
conn.renameRasterTable('qgis_test', table.tableName(), 'Raster2')
table = self._table_by_name(conn.tables('qgis_test', QgsAbstractDatabaseProviderConnection.Raster), 'Raster2')
self.assertTrue(QgsRasterLayer("PG: %s schema='qgis_test' column='%s' table='%s'" % (conn.uri(), table.geometryColumn(), table.tableName()), 'r1', 'gdal').isValid())
self.assertTrue(QgsRasterLayer("PG: %s dbname='qgis_test' schema='qgis_test' column='%s' table='%s'" % (conn.uri(), table.geometryColumn(), table.tableName()), 'r1', 'gdal').isValid())
table_names = self._table_names(conn.tables('qgis_test', QgsAbstractDatabaseProviderConnection.Raster))
self.assertFalse('Raster1' in table_names)
self.assertTrue('Raster2' in table_names)
Expand Down

0 comments on commit 1ce0503

Please sign in to comment.