Skip to content

Conversation

@Irishery
Copy link

Set db and added tests for bot

"client_id": "client123", "nickname": "Cooper123"})
assert create_one.status_code == 200

query = await container.bot.query()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't check here if created_one is inside db by doing query.get(id) and assert for example client_id in json request and db

for _ in range(10)]
)
for item in create_many:
assert item.status_code == 200
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, need to check inside db

nickname=nickname, load=load, max_load=max_load
)
await query.update(updated_bot)
await query.commit()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can commit after for loop

id = bot.dict()["id"]
print(id)
await query.delete(id_=id)
await query.commit()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check her also in db we don not have records

@Irishery
Copy link
Author

Irishery commented Feb 22, 2022

next commit will be with adaptation to new changes in main (today-tomorrow)

):
bot: Bot = await query.create(bot_in)
await query.commit()
fetch_content.delay(bot.id)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove for bot, we don't have any background tasks yet

content = providers.Container(
ContentContainer, resources=resources, config=config.content
)
bot = providers.Container(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be twitch container -> and inside twitch container you can make bot, and channel containers for query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants