def test_loginDomains_setting(self, apic): """Verify that the loginDomain can be set.""" url, user, password, secure = apic secure = False if secure == "False" else True session = cobra.mit.session.LoginSession(url, user, password, secure=secure) session.getLoginDomains() session.loginDomain = session.domains[0] assert session.loginDomain == session.domains[0]
def test_getDomains(self, apic): """Verify that the getLoginDomains() method works. """ url, user, password, secure = apic secure = False if secure == "False" else True session = cobra.mit.session.LoginSession(url, user, password, secure=secure) session.getLoginDomains() assert session.domains != []
def test_loginDomains_setting(self, apic): """Verify that the loginDomain can be set.""" url, user, password, secure = apic secure = False if secure == 'False' else True session = cobra.mit.session.LoginSession(url, user, password, secure=secure) session.getLoginDomains() session.loginDomain = session.domains[0] assert session.loginDomain == session.domains[0]
def test_getDomains(self, apic): """Verify that the getLoginDomains() method works. """ url, user, password, secure = apic secure = False if secure == 'False' else True session = cobra.mit.session.LoginSession(url, user, password, secure=secure) session.getLoginDomains() assert session.domains != []
def test_getLoginDomains_domains_islist(self, apic, getResponseMock): """Verify that the getLoginDomains method works.""" if apic[0] == 'http://mock': getResponseMock.start() url, user, password, secure = apic secure = False if secure == 'False' else True session = cobra.mit.session.LoginSession(url, user, password, secure=secure, requestFormat='json') session.getLoginDomains() assert isinstance(session.domains, list)
def test_getLoginDomains_domains(self, apic, getResponseMock): """Verify that the getLoginDomains method works.""" if apic[0] == 'http://mock': getResponseMock.start() url, user, password, secure = apic secure = False if secure == 'False' else True session = cobra.mit.session.LoginSession(url, user, password, secure=secure, requestFormat='json') session.getLoginDomains() # Currently the APIC ALWAYS returns DefaultAuth in the results assert len(session.domains) > 0