def test_authenticator_with_empty_config(self): testbot = Bot(Brain(BrainConfiguration()), BotConfiguration()) service = Authenticator(BrainSecurityConfiguration("authentication")) self.assertIsNotNone(service) self.assertIsNotNone(service.configuration) self.assertIsNone(service.get_default_denied_srai()) self.assertFalse(service.authenticate(testbot, "console"))
def test_authenticator_with_empty_config(self): client_context = ClientContext(TestClient(), "console") client_context.bot = Bot(BotConfiguration()) client_context.bot.configuration.conversations._max_histories = 3 client_context.brain = client_context.bot.brain service = Authenticator(BrainSecurityConfiguration("authentication")) self.assertIsNotNone(service) self.assertIsNotNone(service.configuration) self.assertIsNone(service.get_default_denied_srai()) self.assertFalse(service.authenticate(client_context))
def __init__(self, configuration: BrainSecurityConfiguration): Authenticator.__init__(self, configuration) self.authorised = ["console"]
def __init__(self, configuration: BrainSecurityConfiguration): Authenticator.__init__(self, configuration)
def __init__(self, configuration: BrainSecurityConfiguration): Authenticator.__init__(self, configuration) self.authorised = [ "console" ]