# Copyright (C) 2020 by Cathy Hu # Copyright (C) 2020 by Martin Rey # Copyright (C) 2023 by Thomas Lindner # # SPDX-License-Identifier: 0BSD import pytest from kibicara.model import Hood from kibicara.platforms.mastodon.model import MastodonAccount, MastodonInstance @pytest.fixture(scope="function") @pytest.mark.anyio async def mastodon_instance(): return await MastodonInstance.create( name="inst4nce", client_id="cl13nt_id", client_secret="cl13nt_s3cr3t", ) @pytest.fixture(scope="function") @pytest.mark.anyio async def mastodon_account(hood_id, mastodon_instance): hood = await Hood.get(id=hood_id) return await MastodonAccount.create( hood=hood, instance=mastodon_instance, access_token="t0k3n", enabled=True, username="us3r", )