light refactoring (#35)

* update poetry lock

* simple refactoring

* move gpt-3.5-turbo-stream-aivvm to deprecated provider
This commit is contained in:
Dmitry Afanasyev
2023-10-12 12:12:05 +03:00
committed by GitHub
parent 7ef8d6e19d
commit 94b50f1b7c
14 changed files with 104 additions and 146 deletions

View File

@@ -41,7 +41,7 @@ async def test_bot_webhook_endpoint(
bot_update = BotUpdateFactory(message=BotMessageFactory.create_instance(text="/help"))
response = await rest_client.post(url="/api/CDDEEFFaabbccdd", json=bot_update)
assert response.status_code == 202
update = await main_application.fastapi_app.state._state["queue"].queue.get()
update = await main_application.bot_queue.queue.get()
update = update.to_dict()
assert update["update_id"] == bot_update["update_id"]
assert_that(update["message"]).is_equal_to(

View File

@@ -204,9 +204,7 @@ async def main_application(
@pytest_asyncio.fixture()
async def rest_client(
main_application: AppApplication,
) -> AsyncGenerator[AsyncClient, None]:
async def rest_client(main_application: AppApplication) -> AsyncGenerator[AsyncClient, None]:
"""
Default http client. Use to test unauthorized requests, public endpoints
or special authorization methods.