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 Jan 2, 2024
1 parent da5ec4c commit 42da83f
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 @@ -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}

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 @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
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 42da83f

Please sign in to comment.