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
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
def logged_out_bot(): """ Return a new logged out user. """ bot = create_bot() bot.logged_in = False return bot
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
def bot(): """ Return a new logged in user. """ return create_bot()