Skip to content

Commit

Permalink
review test
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Apr 22, 2024
1 parent bfc8b5d commit 994f252
Showing 1 changed file with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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):
Expand Down

0 comments on commit 994f252

Please sign in to comment.