add password authentication for bot users
This commit is contained in:
@@ -53,6 +53,18 @@ class AgentDecisionTests(unittest.TestCase):
|
||||
|
||||
|
||||
class StorageTests(unittest.TestCase):
|
||||
def test_user_authorization_is_persisted(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
database_path = Path(directory) / "assistant.sqlite3"
|
||||
storage = AssistantStorage(database_path)
|
||||
|
||||
self.assertFalse(storage.is_user_authorized(42))
|
||||
storage.authorize_user(42)
|
||||
|
||||
reopened_storage = AssistantStorage(database_path)
|
||||
self.assertTrue(reopened_storage.is_user_authorized(42))
|
||||
self.assertFalse(reopened_storage.is_user_authorized(43))
|
||||
|
||||
def test_legacy_user_settings_gets_yandex_model_column(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
database_path = Path(directory) / "assistant.sqlite3"
|
||||
|
||||
Reference in New Issue
Block a user