Example #1
0
def test_standup_start_not_member():
    # SETUP BEGIN
    channel_id = "C123456"
    # SETUP END

    with pytest.raises(errors.AccessError):
        standupStartFunc(data, token2, channel_id)
Example #2
0
def test_standup_start_channel_not_exist():
    # SETUP BEGIN
    channel_id2 = "C123457"
    # SETUP END

    # Channel does not exist
    with pytest.raises(errors.ValueError):
        standupStartFunc(data, token, channel_id2)
Example #3
0
def test_standup_start_correct():
    # SETUP BEGIN
    channel_id = "C123456"
    # SETUP END

    standupStartFunc(data, token, channel_id)

    assert (standupStillActive(data, channel_id, token) is True)
Example #4
0
def test_standup_start_invaild_token():
    # SETUP BEGIN
    channel_id = "C123456"
    invalidateToken(token2, data['tokens'])
    # SETUP END

    with pytest.raises(errors.AccessError):
        standupStartFunc(data, token2, channel_id)
Example #5
0
def test_standup_send_correct():
    # SETUP BEGIN
    channel_id = "C123456"
    standupStartFunc(data, token3, channel_id)
    # SETUP END

    standupSendFunc(data, token3, channel_id, "Hello!!")
    for channel in data['channels']:
        if str(channel_id == channel['channel_id']):
            print(channel['standup_message'])
Example #6
0
def standupStart():
    data = getData()
    token = request.form.get('token')
    checkTokenValidity(token, data)
    channel_id = int(request.form.get('channel_id'))
    time_finish = standupStartFunc(data, token, channel_id)
    return sendSuccess({time_finish})