2020-07-19 12:13:15 +00:00
|
|
|
# Copyright (C) 2020 by Cathy Hu <cathy.hu@fau.de>
|
2020-09-28 22:54:34 +00:00
|
|
|
# Copyright (C) 2020 by Martin Rey <martin.rey@mailbox.org>
|
2023-03-19 18:03:25 +00:00
|
|
|
# Copyright (C) 2023 by Thomas Lindner <tom@dl6tom.de>
|
2020-07-19 12:13:15 +00:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: 0BSD
|
|
|
|
|
2023-04-01 13:23:33 +00:00
|
|
|
import pytest
|
2020-10-13 08:35:20 +00:00
|
|
|
|
2020-07-19 12:13:15 +00:00
|
|
|
from kibicara.model import Hood
|
|
|
|
from kibicara.platforms.telegram.model import Telegram
|
|
|
|
|
|
|
|
|
2023-04-01 13:23:33 +00:00
|
|
|
@pytest.fixture(scope="function")
|
|
|
|
@pytest.mark.anyio
|
|
|
|
async def telegram(hood_id, bot):
|
2023-03-19 18:03:25 +00:00
|
|
|
hood = await Hood.get(id=hood_id)
|
|
|
|
return await Telegram.create(
|
2023-04-01 13:23:33 +00:00
|
|
|
hood=hood,
|
|
|
|
api_token=bot["api_token"],
|
|
|
|
welcome_message=bot["welcome_message"],
|
2020-07-19 12:13:15 +00:00
|
|
|
)
|