Добавлены новые методы для получения статистики постов пользователей, информации о последних постах и количестве банов. Обновлены запросы в репозиториях для сортировки пользователей по дате бана. Исправлены вызовы функций форматирования сообщений для администраторов. Обновлены тесты для проверки новых функциональностей.
This commit is contained in:
@@ -85,7 +85,7 @@ class TestPostPublishService:
|
||||
return call
|
||||
|
||||
@patch("helper_bot.handlers.callback.services.send_text_message")
|
||||
@patch("helper_bot.handlers.callback.services.get_text_message")
|
||||
@patch("helper_bot.handlers.callback.services.get_publish_text")
|
||||
async def test_publish_post_text_success(
|
||||
self, mock_get_text, mock_send_text, service, mock_call_text, mock_db
|
||||
):
|
||||
@@ -214,7 +214,7 @@ class TestPostPublishService:
|
||||
|
||||
@patch("helper_bot.handlers.callback.services.send_photo_message")
|
||||
@patch("helper_bot.handlers.callback.services.send_text_message")
|
||||
@patch("helper_bot.handlers.callback.services.get_text_message")
|
||||
@patch("helper_bot.handlers.callback.services.get_publish_text")
|
||||
async def test_publish_post_photo_success(
|
||||
self, mock_get_text, mock_send_text, mock_send_photo, service, mock_db
|
||||
):
|
||||
@@ -239,7 +239,7 @@ class TestPostPublishService:
|
||||
|
||||
@patch("helper_bot.handlers.callback.services.send_video_message")
|
||||
@patch("helper_bot.handlers.callback.services.send_text_message")
|
||||
@patch("helper_bot.handlers.callback.services.get_text_message")
|
||||
@patch("helper_bot.handlers.callback.services.get_publish_text")
|
||||
async def test_publish_post_video_success(
|
||||
self, mock_get_text, mock_send_text, mock_send_video, service, mock_db
|
||||
):
|
||||
@@ -285,7 +285,7 @@ class TestPostPublishService:
|
||||
|
||||
@patch("helper_bot.handlers.callback.services.send_audio_message")
|
||||
@patch("helper_bot.handlers.callback.services.send_text_message")
|
||||
@patch("helper_bot.handlers.callback.services.get_text_message")
|
||||
@patch("helper_bot.handlers.callback.services.get_publish_text")
|
||||
async def test_publish_post_audio_success(
|
||||
self, mock_get_text, mock_send_text, mock_send_audio, service, mock_db
|
||||
):
|
||||
@@ -499,7 +499,7 @@ class TestPostPublishService:
|
||||
|
||||
@patch("helper_bot.handlers.callback.services.send_media_group_to_channel")
|
||||
@patch("helper_bot.handlers.callback.services.send_text_message")
|
||||
@patch("helper_bot.handlers.callback.services.get_text_message")
|
||||
@patch("helper_bot.handlers.callback.services.get_publish_text")
|
||||
async def test_publish_media_group_success(
|
||||
self, mock_get_text, mock_send_text, mock_send_media, service, mock_db
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user