Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added is_filled field in response #1

Merged
merged 5 commits into from
Apr 25, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixed flake8 warnings
Relrin committed Apr 25, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit fc185d0f3a45371ec91c0f349f783a08666943cc
2 changes: 1 addition & 1 deletion strategist/app/algorithms/simple_average.py
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ def seed_player(self, player, teams, max_difference=25, **kwargs):
teams_info = self.get_teams_info(teams)
suitable_team = self.find_suitable_team(teams_info)

if suitable_team and self.is_fair_seeding(player, suitable_team, teams_info, max_difference):
if suitable_team and self.is_fair_seeding(player, suitable_team, teams_info, max_difference): # NOQA
added = True
updated_teams[suitable_team.name].append(player)

2 changes: 1 addition & 1 deletion strategist/app/workers/schemas.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from marshmallow import Schema, fields, validates, ValidationError
from marshmallow import Schema, fields


class RequestDataSchema(Schema):
2 changes: 1 addition & 1 deletion strategist/tests/test_game_mode.py
Original file line number Diff line number Diff line change
@@ -54,4 +54,4 @@ def test_game_mode_cant_seed_a_player_into_filled_teams(self):
self.assertEqual(len(updated_teams["team 1"]), 1)
self.assertEqual(len(updated_teams["team 2"]), 1)
self.assertNotIn(new_player, updated_teams["team 1"])
self.assertNotIn(new_player, updated_teams["team 2"])
self.assertNotIn(new_player, updated_teams["team 2"])