Skip to content

Commit c65b846

Browse files
committed
Allow alternate error message for non-existent postgres user
1 parent 37bbeed commit c65b846

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/python_tests/postgis_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,8 @@ def test_bad_connection():
369369
geometry_field='geom',
370370
user="rolethatdoesnotexist")
371371
except Exception as e:
372-
assert 'role "rolethatdoesnotexist" does not exist' in str(e)
372+
assert 'role "rolethatdoesnotexist" does not exist' in str(e) or \
373+
'authentication failed for user "rolethatdoesnotexist"' in str(e)
373374

374375
def test_empty_db():
375376
ds = mapnik.PostGIS(dbname=MAPNIK_TEST_DBNAME, table='empty')

0 commit comments

Comments
 (0)