From 42da83ffc1fd0292eb9ffec232732c37f36b6dfe Mon Sep 17 00:00:00 2001 From: Askaholic Date: Sun, 26 Nov 2023 09:23:16 -0900 Subject: [PATCH] Remove deprecated player_info fields (#980) --- server/players.py | 4 ---- tests/integration_tests/test_login.py | 12 ------------ tests/integration_tests/test_teammatchmaker.py | 6 ------ tests/unit_tests/test_players.py | 3 --- 4 files changed, 25 deletions(-) diff --git a/server/players.py b/server/players.py index 5f8b37129..b0df2bc1a 100644 --- a/server/players.py +++ b/server/players.py @@ -155,10 +155,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} diff --git a/tests/integration_tests/test_login.py b/tests/integration_tests/test_login.py index 9fd6f795b..f08dc0dde 100644 --- a/tests/integration_tests/test_login.py +++ b/tests/integration_tests/test_login.py @@ -111,9 +111,6 @@ async def test_server_login_valid(lobby_server): "number_of_games": 2 } }, - "global_rating": [1650.0, 62.52], - "ladder_rating": [1650.0, 62.52], - "number_of_games": 2 } assert msg == { "command": "welcome", @@ -154,9 +151,6 @@ async def test_server_login_valid_admin(lobby_server): "number_of_games": 5 } }, - "global_rating": [2000.0, 125.0], - "ladder_rating": [2000.0, 125.0], - "number_of_games": 5, } assert msg == { "command": "welcome", @@ -196,9 +190,6 @@ async def test_server_login_valid_moderator(lobby_server): "number_of_games": 0 } }, - "global_rating": [1500, 500], - "ladder_rating": [1500, 500], - "number_of_games": 0 } assert msg == { "command": "welcome", @@ -290,9 +281,6 @@ async def test_server_login_token_valid(lobby_server, jwk_priv_key, jwk_kid): "number_of_games": 2 } }, - "global_rating": [1650.0, 62.52], - "ladder_rating": [1650.0, 62.52], - "number_of_games": 2 } assert msg == { "command": "welcome", diff --git a/tests/integration_tests/test_teammatchmaker.py b/tests/integration_tests/test_teammatchmaker.py index f2445730e..50c1e7368 100644 --- a/tests/integration_tests/test_teammatchmaker.py +++ b/tests/integration_tests/test_teammatchmaker.py @@ -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, } ] } @@ -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, } diff --git a/tests/unit_tests/test_players.py b/tests/unit_tests/test_players.py index 8768b51fb..9e99dc080 100644 --- a/tests/unit_tests/test_players.py +++ b/tests/unit_tests/test_players.py @@ -102,9 +102,6 @@ def test_serialize(): "number_of_games": 0 } }, - "global_rating": (1234, 68), - "ladder_rating": (1500, 230), - "number_of_games": 542, }