Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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'])
Ejemplo n.º 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})