Skip to content

Commit 065fb0e

Browse files
committed
fix port int to string
1 parent 6cf1295 commit 065fb0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/auth_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_ctrl_c_event(self):
131131

132132
def test_pgpassfile_env(self):
133133
path = os.path.join(self.pb.tmp_path, module_name, 'pgpass.conf')
134-
line = ":".join(['127.0.0.1', self.node.port, 'postgres', 'backup', 'password'])
134+
line = ":".join(['127.0.0.1', str(self.node.port), 'postgres', 'backup', 'password'])
135135
create_pgpass(path, line)
136136
os.environ["PGPASSFILE"] = path
137137
try:
@@ -145,7 +145,7 @@ def test_pgpassfile_env(self):
145145

146146
def test_pgpass(self):
147147
path = os.path.join(os.path.expanduser('~'), '.pgpass')
148-
line = ":".join(['127.0.0.1', self.node.port, 'postgres', 'backup', 'password'])
148+
line = ":".join(['127.0.0.1', str(self.node.port), 'postgres', 'backup', 'password'])
149149
create_pgpass(path, line)
150150
try:
151151
self.assertEqual(
@@ -158,7 +158,7 @@ def test_pgpass(self):
158158

159159
def test_pgpassword(self):
160160
path = os.path.join(os.path.expanduser('~'), '.pgpass')
161-
line = ":".join(['127.0.0.1', self.node.port, 'postgres', 'backup', 'wrong_password'])
161+
line = ":".join(['127.0.0.1', str(self.node.port), 'postgres', 'backup', 'wrong_password'])
162162
create_pgpass(path, line)
163163
os.environ["PGPASSWORD"] = 'password'
164164
try:

0 commit comments

Comments
 (0)