Initial commit

This commit is contained in:
user
2026-07-12 14:06:45 +04:00
commit a75028d68f
148 changed files with 3275 additions and 0 deletions
@@ -0,0 +1,23 @@
from core.account_manager import AccountManager
def test_crud_operations(tmp_path):
db_file = tmp_path / "accounts.json"
manager = AccountManager(db_file)
# Добавление
manager.add_user("alice", "hash1", "salt1")
assert "alice" in manager.list_users()
# Чтение
user = manager.get_user("alice")
assert user["hash"] == "hash1"
# Обновление
assert manager.update_user("alice", "hash2", "salt2")
user = manager.get_user("alice")
assert user["hash"] == "hash2"
# Удаление
assert manager.delete_user("alice")
assert "alice" not in manager.list_users()