Exemplo n.º 1
0
def test_channel_invite_test_7():
    token1, u_id1, token2, u_id2, token3, u_id3 = setup()
    channel = channels_create(token1, 'someChannel', 'true')
    channel_id1 = channel['channel_id']

    with pytest.raises(ValueError):
        channel_invite(token1, channel_id1, u_id1)
Exemplo n.º 2
0
def test_channel_details_3():
    token1, u_id1, token2, u_id2 = setup()
    dict3 = channels_create(token1, 'someChannel', 'true')
    channel_id1 = dict3['channel_id']
    channel_invite(token1, channel_id1, u_id2)
    assert (channel_details(token2, channel_id1) == {
        'name':
        'someChannel',
        'owner_members': [{
            'u_id': u_id1,
            'name_first': 'Yasin',
            'name_last': 'Kevin',
            'profile_img_url': None
        }],
        'all_members': [{
            'u_id': u_id1,
            'name_first': 'Yasin',
            'name_last': 'Kevin',
            'profile_img_url': None
        }, {
            'u_id': u_id2,
            'name_first': 'Peter',
            'name_last': 'Steven',
            'profile_img_url': None
        }]
    })
Exemplo n.º 3
0
def test_channel_invite_test_3():
    token1, u_id1, token2, u_id2, token3, u_id3 = setup()
    channel = channels_create(token1, 'someChannel', 'true')
    channel_id1 = channel['channel_id']

    assert channel_invite(token1, channel_id1, u_id2) == {}
    assert channel_invite(token1, channel_id1, u_id3) == {}

    assert is_member(u_id2, channel_id1)
    assert is_member(u_id3, channel_id1)