From e21dcbbf0acac181e8fff1845ee5c1ac592e7ffd Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 28 Jun 2021 15:07:14 +0100 Subject: [PATCH] Don't assume that the user "postgres" always exists in tests --- tests/types/test_array.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/types/test_array.py b/tests/types/test_array.py index 90cf1bd1e..b04b75237 100644 --- a/tests/types/test_array.py +++ b/tests/types/test_array.py @@ -128,10 +128,10 @@ def test_array_register(conn): def test_array_of_unknown_builtin(conn): + user = conn.execute("select user").fetchone()[0] # we cannot load this type, but we understand it is an array - val = "postgres=arwdDxt/postgres" - cur = conn.cursor() - cur.execute(f"select '{val}'::aclitem, array['{val}']::aclitem[]") + val = f"{user}=arwdDxt/{user}" + cur = conn.execute(f"select '{val}'::aclitem, array['{val}']::aclitem[]") res = cur.fetchone() assert cur.description[0].type_code == builtins["aclitem"].oid assert res[0] == val -- 2.47.3