Skip to content

Commit

Permalink
create a new user
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Apr 19, 2024
1 parent 4e483fb commit bfc8b5d
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,18 @@ def testSecureWithUnsecureClient(self, gatewaywrapper):
@pytest.mark.parametrize("secure", [None, "False", "True"])
def testSecureWithUsername(self, gatewaywrapper, secure):

with BlitzGateway(username="root",
passwd=dbhelpers.ROOT.passwd,
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:
conn.connect()
Expand All @@ -358,6 +368,7 @@ def testSecureWithUsername(self, gatewaywrapper, secure):
assert conn.isSecure()
assert conn.c.isSecure()
assert conn.secure
conn.close()

def testSecureMisMatch(self, gatewaywrapper):
client = omero.client()
Expand Down

0 comments on commit bfc8b5d

Please sign in to comment.