mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
[processing] fix deprecation warnings in GDAL test
This commit is contained in:
parent
23de13c03f
commit
52e29b93b8
@ -74,31 +74,31 @@ class TestGdalOgr2OgrToPostgis(unittest.TestCase):
|
|||||||
cs = obj.getConnectionString()
|
cs = obj.getConnectionString()
|
||||||
# NOTE: defaults are debatable, see
|
# NOTE: defaults are debatable, see
|
||||||
# https://github.com/qgis/QGIS/pull/3607#issuecomment-253971020
|
# https://github.com/qgis/QGIS/pull/3607#issuecomment-253971020
|
||||||
self.assertEquals(obj.getConnectionString(),
|
self.assertEqual(obj.getConnectionString(),
|
||||||
"host=localhost port=5432 active_schema=public")
|
"host=localhost port=5432 active_schema=public")
|
||||||
|
|
||||||
obj.setParameterValue('HOST', 'remote')
|
obj.setParameterValue('HOST', 'remote')
|
||||||
self.assertEquals(obj.getConnectionString(),
|
self.assertEqual(obj.getConnectionString(),
|
||||||
"host=remote port=5432 active_schema=public")
|
"host=remote port=5432 active_schema=public")
|
||||||
|
|
||||||
obj.setParameterValue('HOST', '')
|
obj.setParameterValue('HOST', '')
|
||||||
self.assertEquals(obj.getConnectionString(),
|
self.assertEqual(obj.getConnectionString(),
|
||||||
"port=5432 active_schema=public")
|
"port=5432 active_schema=public")
|
||||||
|
|
||||||
obj.setParameterValue('PORT', '5555')
|
obj.setParameterValue('PORT', '5555')
|
||||||
self.assertEquals(obj.getConnectionString(),
|
self.assertEqual(obj.getConnectionString(),
|
||||||
"port=5555 active_schema=public")
|
"port=5555 active_schema=public")
|
||||||
|
|
||||||
obj.setParameterValue('PORT', '')
|
obj.setParameterValue('PORT', '')
|
||||||
self.assertEquals(obj.getConnectionString(),
|
self.assertEqual(obj.getConnectionString(),
|
||||||
"active_schema=public")
|
"active_schema=public")
|
||||||
|
|
||||||
obj.setParameterValue('USER', 'usr')
|
obj.setParameterValue('USER', 'usr')
|
||||||
self.assertEquals(obj.getConnectionString(),
|
self.assertEqual(obj.getConnectionString(),
|
||||||
"active_schema=public user=usr")
|
"active_schema=public user=usr")
|
||||||
|
|
||||||
obj.setParameterValue('PASSWORD', 'pwd')
|
obj.setParameterValue('PASSWORD', 'pwd')
|
||||||
self.assertEquals(obj.getConnectionString(),
|
self.assertEqual(obj.getConnectionString(),
|
||||||
"password=pwd active_schema=public user=usr")
|
"password=pwd active_schema=public user=usr")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user