def test_ldap_user_right(self): mockr = mocker.Mocker() ldap_auth._ldap_provider.ldap_module = mockr.mock() with wlcontext(self.core_server): session_id = core_api.login(fake_ldap_user, fake_ldap_passwd) self.assertTrue( isinstance(session_id, SessionId) ) self.assertTrue( len(session_id.id) > 5 )
def test_right_session(self): with wlcontext(self.core_server): session_id = core_api.login(fake_right_user, fake_right_passwd) self.assertTrue( isinstance(session_id, SessionId) ) self.assertTrue( len(session_id.id) > 5 )