mirror of
https://gitflic.ru/project/maks1ms/ocab.git
synced 2024-12-23 16:23:01 +03:00
Изменение наименования db_api
This commit is contained in:
parent
b7fdd75458
commit
fb6da3d627
@ -1,6 +1,6 @@
|
|||||||
from src.modules.standard.config.config import get_config
|
from src.modules.standard.config.config import get_config
|
||||||
from src.modules.standard.database.models.base import database
|
from src.modules.standard.database.models.base import database
|
||||||
from src.modules.standard.database.api import connect_database
|
from src.modules.standard.database.db_api import connect_database
|
||||||
|
|
||||||
from asyncio import run
|
from asyncio import run
|
||||||
from aiogram import Bot, Dispatcher
|
from aiogram import Bot, Dispatcher
|
||||||
|
@ -22,4 +22,7 @@ def get_yandexgpt_catalog_id() -> str:
|
|||||||
def get_yandexgpt_prompt() -> str:
|
def get_yandexgpt_prompt() -> str:
|
||||||
return get_config()["YANDEX_GPT_PROMPT"]
|
return get_config()["YANDEX_GPT_PROMPT"]
|
||||||
|
|
||||||
|
def get_access_rights() -> dict:
|
||||||
|
return get_config()["ACCESS_RIGHTS"]
|
||||||
|
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
from . import api, models
|
from . import db_api, models
|
@ -1,7 +1,7 @@
|
|||||||
import unittest
|
import unittest
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from ..api import *
|
from ..db_api import *
|
||||||
from ...exceptions.module_exceptions import MissingModuleName, NotExpectedModuleName
|
from ...exceptions.module_exceptions import MissingModuleName, NotExpectedModuleName
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from ..database.api import get_user_role
|
from ..database.db_api import get_user_role
|
||||||
from ..config.config import get_config
|
from ..config.config import get_config
|
||||||
|
|
||||||
yaml_load = get_config()
|
yaml_load = get_config()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
from ...database.api import create_tables, connect_database, add_user
|
from ...database.db_api import create_tables, connect_database, add_user
|
||||||
from ..api import Roles
|
from ..roles import Roles
|
||||||
|
|
||||||
|
|
||||||
class TestRoles(unittest.IsolatedAsyncioTestCase):
|
class TestRoles(unittest.IsolatedAsyncioTestCase):
|
||||||
|
Loading…
Reference in New Issue
Block a user