add tests, some fixes

This commit is contained in:
KatykhinAA
2024-07-10 23:18:36 +03:00
parent 7860d4f5c0
commit f2e44ddb29
9 changed files with 1034 additions and 63 deletions

View File

@@ -1,8 +1,16 @@
import os
from db import BotDB
from database.db import BotDB
# Получаем текущий рабочий каталог
current_dir = os.path.dirname(os.path.abspath(__file__))
BotDB = BotDB()
# Переходим на уровень выше, чтобы выйти из папки migrations/
parent_dir = os.path.dirname(current_dir)
# Строим путь до файла
tg_bot_database_path = os.path.join(parent_dir, "tg-bot-database")
BotDB = BotDB(f'{tg_bot_database_path}')
def get_filename():

View File

@@ -1,7 +1,7 @@
import os
from db import BotDB
from database.db import BotDB
BotDB = BotDB()
BotDB = BotDB('tg-bot-database')
def get_filename():