Пример #1
0
def test_set_already():
    token = A['token']
    channelID = Pub_channel['channel_id']
    length = '15'

    with pytest.raises(Errors.AccessError):
        OF.standup_start(token, channelID, length)
Пример #2
0
def test_user_INvalid():
    token = '24367543456798765'
    channelID = Pub_channel['channel_id']
    length = '15'

    with pytest.raises(Errors.AccessError):
        OF.standup_start(token, channelID, length)
Пример #3
0
def test_channel_Invalid():
    token = A['token']
    channelID = Pub_channel['channel_id'] + 10086
    length = '15'

    with pytest.raises(Errors.AccessError):
        OF.standup_start(token, channelID, length)
Пример #4
0
def test_user_notTheOwner():
    token = B['token']
    channelID = Pub_channel['channel_id']
    length = '15'

    with pytest.raises(OF.ValueError):
        OF.standup_start(token, channelID, length)
Пример #5
0
def test_set_success():
    reset_data()
    A = auth_register("*****@*****.**", "wsad1990", "Good", "Morning")
    Pub_channel = channels_create(A['token'], 'StdChannel', 'True')
    token = A['token']
    channelID = Pub_channel['channel_id']
    length = '15'

    OF.standup_start(token, channelID, length)
def test_user_NULL():
    auth_login("*****@*****.**", 'HoyaLee2019')
    
    token = None
    channelID = Pub_channel['channel_id'] 
    length = '15'
    
    with pytest.raises(TypeError):
        OF.standup_start(token, channelID, length)
def test_set_channel_notRunning():
    reset_data()
    A = auth_register("*****@*****.**", 'HoyaLee2019', "Hoya", "Lee")
    Pub_channel = channels_create(A['token'], 'STDChannel', 'True')
    OF.standup_start(A['token'], Pub_channel['channel_id'], '15')

    token = A['token']
    channel_id = Pub_channel['channel_id']
    OF.standup_active(token, channel_id)
Пример #8
0
def test_standUp_logout():
    token = A['token']
    auth_logout(A['token'])

    channelID = Pub_channel['channel_id']

    length = '15'

    with pytest.raises(OF.AccessError):
        OF.standup_start(token, channelID, length)
def test_set_successful():
    reset_data()
    A = auth_register("*****@*****.**", 'HoyaLee2019', "Hoya", "Lee")
    B = auth_register("*****@*****.**", "wsad1990", "Good", "Morning")
    Pub_channel = channels_create(A['token'], 'STDChannel', 'True')
    token = A['token']
    channelID = Pub_channel['channel_id']
    length = '15'
    
    OF.standup_start(token, channelID, length)
def test_channel_Invalid():
    reset_data()
    A = auth_register("*****@*****.**", 'HoyaLee2019', "Hoya", "Lee")
    Pub_channel = channels_create(A['token'], 'STDChannel', 'True')
    token = A['token']
    channelID = Pub_channel['channel_id'] + 10086
    length = '15'
    
    with pytest.raises(CHF.ValueError):
        OF.standup_start(token, channelID, length)
def test_user_notTheOwner():
    reset_data()
    B = auth_register("*****@*****.**", "wsad1990", "Good", "Morning")
    A = auth_register("*****@*****.**", 'HoyaLee2019', "Hoya", "Lee")
    Pub_channel = channels_create(A['token'], 'STDChannel', 'True')
    token = B['token']
    channelID = Pub_channel['channel_id'] 
    length = '15'
    
    with pytest.raises(OF.AccessError):
        OF.standup_start(token, channelID, length)