Skip to content

Commit

Permalink
Use a list instead
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackYps committed Jun 10, 2024
1 parent 86ac1e4 commit d194df0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion server/matchmaker/matchmaker_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def to_dict(self):
ndigits=2
),
"num_players": self.num_players,
"ratings": ratings,
"ratings": list(ratings),
# DEPRECATED
"boundary_80s": [search.boundary_80 for search in self._queue.keys()],
# DEPRECATED
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/test_matchmaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ async def test_matchmaker_info_message(lobby_server, mocker):
assert queue["queue_pop_time_delta"] == math.ceil(
config.QUEUE_POP_TIME_MAX / 2
)
assert queue["ratings"] == {}
assert queue["ratings"] == []
assert queue["boundary_80s"] == []
assert queue["boundary_75s"] == []

Expand Down Expand Up @@ -485,7 +485,7 @@ async def test_command_matchmaker_info(lobby_server, mocker):
assert queue["queue_pop_time_delta"] == math.ceil(
config.QUEUE_POP_TIME_MAX / 2
)
assert queue["ratings"] == {}
assert queue["ratings"] == []
assert queue["boundary_80s"] == []
assert queue["boundary_75s"] == []

Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/test_teammatchmaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ async def test_info_message(lobby_server):

if queue["queue_name"] == "tmm2v2":
assert boundaries == [[300, 700]]
assert queue["ratings"] == {500}
assert queue["ratings"] == [500]
else:
assert boundaries == []
assert queue["ratings"] == {}
assert queue["ratings"] == []


@fast_forward(10)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/test_lobbyconnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ async def test_command_matchmaker_info(
"queue_pop_time_delta": 1.0,
"team_size": 3,
"num_players": 6,
"ratings": {1700, 125, 1125},
"ratings": [1700, 125, 1125],
"boundary_80s": [(1800, 2200), (400, 800), (800, 1200)],
"boundary_75s": [(1900, 2100), (500, 700), (900, 1100)]
}
Expand Down

0 comments on commit d194df0

Please sign in to comment.