Skip to content

Commit d860cac

Browse files
committed
Fix test test_connection_default_file:
check if password was set in connection options before writing into configuration file
1 parent 424320b commit d860cac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

testing/test/integration/test_connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def test_connection_default_file(self):
3737
f.write("host=%s\n" % default_conf["host"])
3838
f.write("port=%i\n" % default_conf["port"])
3939
f.write("user=%s\n" % default_conf["user"])
40-
f.write("password=%s\n" % default_conf["password"])
40+
if "password" in default_conf:
41+
f.write("password=%s\n" % default_conf["password"])
4142
f.write("database=%s\n" % default_conf["database"])
4243
f.close()
4344

0 commit comments

Comments
 (0)