def test_matchmaking_loop():
    c1 = game_client.GameClient()
    c2 = game_client.GameClient()

    get_match_request = tbmatch.match_pb2.GetMatchRequest()
    c1.GetMatch(get_match_request)
    c2.GetMatch(get_match_request)

    # wait for at least 1 poll to happen
    time.sleep(6)

    assert check_client_events(c1) and check_client_events(c2)
예제 #2
0
def test_join_lobby_code():
    c = game_client.GameClient()
    request = tbmatch.lobby_pb2.CreateLobbyRequest()
    request.type = tbmatch.lobby_pb2.LT_QUEUED
    c.CreateLobby(request)

    request = tbmatch.lobby_pb2.JoinLobbyByCodeRequest()
    request.code = "test"
    c.JoinLobbyByCode(request)

    c.DoGetEvents()
예제 #3
0
def test_set_lobby_ready():
    c = game_client.GameClient()
    request = tbmatch.lobby_pb2.CreateLobbyRequest()
    request.type = tbmatch.lobby_pb2.LT_QUEUED
    c.CreateLobby(request)

    request = tbmatch.lobby_pb2.LobbySetReadyRequest()
    request.ready = True
    c.LobbySetReady(request)

    c.DoGetEvents()
def test_home():
    c = game_client.GameClient()
    profile = c.GetGameProfile()
    games = c.GetRecentGames()
def test_login():
    game_client.GameClient()
예제 #6
0
def test_create_lobby():
    c = game_client.GameClient()
    request = tbmatch.lobby_pb2.CreateLobbyRequest()
    request.type = tbmatch.lobby_pb2.LT_QUEUED
    c.CreateLobby(request)
    c.DoGetEvents()