Beispiel #1
0
def event_member():
    """
    Return a new event's ID, its admin, as well as a member.
    """
    admin = create_bot()
    member = create_bot()
    event_id = create_event(admin.username, "ABC", [member.username])
    invite_user(admin.username, member.username, event_id)
    return admin, member, event_id
Beispiel #2
0
def event():
    """
    Return a new event's ID as well as its admin.
    """
    bot = create_bot()
    event_id = create_event(bot.username, "ABC", [])
    return bot, event_id
Beispiel #3
0
def logged_out_bot():
    """
    Return a new logged out user.
    """
    bot = create_bot()
    bot.logged_in = False
    return bot
Beispiel #4
0
def test_success_with_members(bot):
    """
    Test a successful event creation, with additional members.
    """
    members = {create_bot().username for _ in range(3)}
    e_id = create_event(bot.username, "ABC", members)

    members.add(bot.username)
    assert data.events[e_id].member_usernames == members
    assert data.events[e_id].admin_username == bot.username
Beispiel #5
0
def bot():
    """
    Return a new logged in user.
    """
    return create_bot()