MCPcopy Create free account
hub / github.com/apache/cloudstack / logon_test_user

Method logon_test_user

test/integration/plugins/ldap/test_ldap.py:318–333  ·  view source on GitHub ↗
(self, username, domain = None)

Source from the content-addressed store, hash-verified

316
317
318 def logon_test_user(self, username, domain = None):
319 # login of dahn should create a user in account juniors
320 args = {}
321 args["command"] = 'login'
322 args["username"] = username
323 args["password"] = 'password'
324 if domain == None:
325 args["domain"] = "/" + self.parentDomain.name + "/" + self.syncDomain.name
326 else:
327 args["domain"] = domain
328 args["response"] = "json"
329 session = requests.Session()
330 try:
331 resp = session.post(self.server_url, params=args, verify=False)
332 except requests.exceptions.ConnectionError as e:
333 self.fail("Failed to attempt login request to mgmt server")
334
335
336 @classmethod

Calls 1

postMethod · 0.45

Tested by

no test coverage detected