Example #1
0
def test_it_raises_error_when_reading_missing_bot(
    install_store: TeamiclinkInstallStore,
):
    # when
    try:
        install_store.read_bot(team_id=TEAM_ID)
        pytest.fail("expected error")

    # then
    except MissingBotError as error:
        assert TEAM_ID in str(error)
Example #2
0
def test_it_reads_slack_bot(
    install_store: TeamiclinkInstallStore, slack_bot: TeamiclinkBot
):
    # when
    result = install_store.read_bot(team_id=slack_bot.team_id)

    # then
    assert result.team_id == slack_bot.team_id
    assert result.bot_id == slack_bot.bot_id
    assert result.bot_user_id == slack_bot.bot_user_id
    assert result.installed_at == slack_bot.installed_at
    assert result.bot_token == slack_bot.bot_token