Skip to content

Commit

Permalink
Remove deprecated player_info fields (#980)
Browse files Browse the repository at this point in the history
  • Loading branch information
Askaholic committed Dec 23, 2024
1 parent 3232ca2 commit 84501b9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 25 deletions.
4 changes: 0 additions & 4 deletions server/players.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,6 @@ def to_dict(self) -> dict:
}
for rating_type in self.ratings
},
# DEPRECATED: Use ratings instead
"global_rating": self.ratings[RatingType.GLOBAL],
"ladder_rating": self.ratings[RatingType.LADDER_1V1],
"number_of_games": self.game_count[RatingType.GLOBAL],
}
return {k: v for k, v in cmd.items() if v is not None}

Expand Down
12 changes: 0 additions & 12 deletions tests/integration_tests/test_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ async def test_server_login_valid(lobby_server, fixed_time):
"number_of_games": 2
}
},
"global_rating": [1650.0, 62.52],
"ladder_rating": [1650.0, 62.52],
"number_of_games": 2
}
assert msg == {
"command": "welcome",
Expand Down Expand Up @@ -157,9 +154,6 @@ async def test_server_login_valid_admin(lobby_server, fixed_time):
"number_of_games": 5
}
},
"global_rating": [2000.0, 125.0],
"ladder_rating": [2000.0, 125.0],
"number_of_games": 5,
}
assert msg == {
"command": "welcome",
Expand Down Expand Up @@ -200,9 +194,6 @@ async def test_server_login_valid_moderator(lobby_server, fixed_time):
"number_of_games": 0
}
},
"global_rating": [1500, 500],
"ladder_rating": [1500, 500],
"number_of_games": 0
}
assert msg == {
"command": "welcome",
Expand Down Expand Up @@ -310,9 +301,6 @@ async def test_server_login_token_valid(lobby_server, jwk_priv_key, jwk_kid, fix
"number_of_games": 2
}
},
"global_rating": [1650.0, 62.52],
"ladder_rating": [1650.0, 62.52],
"number_of_games": 2
}
assert msg == {
"command": "welcome",
Expand Down
6 changes: 0 additions & 6 deletions tests/integration_tests/test_teammatchmaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,9 +610,6 @@ async def test_ratings_initialized_based_on_global(lobby_server):
"number_of_games": 5
}
},
"global_rating": [2000.0, 125.0],
"ladder_rating": [2000.0, 125.0],
"number_of_games": 5,
}
]
}
Expand Down Expand Up @@ -651,9 +648,6 @@ async def test_ratings_initialized_based_on_global(lobby_server):
"number_of_games": 0
}
},
"global_rating": [2000.0, 125.0],
"ladder_rating": [2000.0, 125.0],
"number_of_games": 5,
}


Expand Down
3 changes: 0 additions & 3 deletions tests/unit_tests/test_players.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ def test_serialize():
"number_of_games": 0
}
},
"global_rating": (1234, 68),
"ladder_rating": (1500, 230),
"number_of_games": 542,
}


Expand Down

0 comments on commit 84501b9

Please sign in to comment.