From 994f252e61e10f9a0836fe0deb921d9f4612823c Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Mon, 22 Apr 2024 13:10:35 +0100 Subject: [PATCH] review test --- .../gatewaytest/test_connection.py | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/components/tools/OmeroPy/test/integration/gatewaytest/test_connection.py b/components/tools/OmeroPy/test/integration/gatewaytest/test_connection.py index 0a69cb76ed5..398940f514c 100644 --- a/components/tools/OmeroPy/test/integration/gatewaytest/test_connection.py +++ b/components/tools/OmeroPy/test/integration/gatewaytest/test_connection.py @@ -336,21 +336,11 @@ def testSecureWithUnsecureClient(self, gatewaywrapper): @pytest.mark.parametrize("secure", [None, "False", "True"]) def testSecureWithUsername(self, gatewaywrapper, secure): - - gatewaywrapper.loginAsAdmin() - username = "session_test_secure_with_name" - password = "foobar" - last_name = "SessionId" - test_user = dbhelpers.UserEntry(username, password, - firstname='User', - lastname=last_name) - test_user.create(gatewaywrapper.gateway, dbhelpers.ROOT.passwd) - gatewaywrapper.doDisconnect() - - with BlitzGateway(username=username, - passwd=password, - host="localhost", - secure=secure) as conn: + try: + conn = BlitzGateway(username="root", + passwd=dbhelpers.ROOT.passwd, + host="localhost", + secure=secure) conn.connect() if secure: assert conn.isSecure() @@ -368,6 +358,7 @@ def testSecureWithUsername(self, gatewaywrapper, secure): assert conn.isSecure() assert conn.c.isSecure() assert conn.secure + finally: conn.close() def testSecureMisMatch(self, gatewaywrapper):