Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gbtami committed Dec 25, 2024
1 parent e41b643 commit 86ba024
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions server/auto_pair.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def add_to_auto_pairings(app_state, user, data):
variant_tc[1][2],
)
variant, chess960, base, inc, byoyomi_period = variant_tc
print(variant_tc)
# We don't want to create non byo variant with byo TC combinations
if (byoyomi_period > 0 and variant not in BYOS) or variant.startswith("bughouse"):
continue
Expand Down
4 changes: 2 additions & 2 deletions tests/test_auto_pairing.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def test_add_to_auto_pairings(self):
app_state, self.bplayer, DATA["chess"]
)

self.assertEqual(auto_variant_tc, variant_tc)
self.assertIn(variant_tc, app_state.auto_pairings)
self.assertEqual(app_state.auto_pairing_users[self.bplayer], (-10000, 10000))
self.assertIn(self.bplayer, app_state.auto_pairings[variant_tc])
self.assertTrue(self.bplayer.ready_for_auto_pairing)
Expand All @@ -106,7 +106,7 @@ def test_add_to_auto_pairings(self):
app_state, self.aplayer, DATA["chess960"]
)

self.assertEqual(auto_variant_tc, variant_tc)
self.assertIn(variant_tc, app_state.auto_pairings)
self.assertIsNone(matching_user)
self.assertIsNone(matching_seek)
self.assertTrue(self.aplayer.ready_for_auto_pairing)
Expand Down

0 comments on commit 86ba024

Please sign in to comment.