def test_move_button(self): """ Can we properly increment through the player order? """ expected = self.table.player_order[:] x = expected.pop(0) expected.append(x) app.move_button(self.table) self.assertEqual(expected, self.table.player_order)
def test_bb_mia(self): """ Can we prepend sb position to None if bb goes mia """ self.table.player_order[1].active = False app.move_button(self.table) self.assertEqual(self.table.player_order[0], None) expected = self.table.player_order[:] expected.pop(0) app.move_button(self.table) self.assertEqual(expected, self.table.player_order)
def test_add_player_to_hand(self): """ Can we add a new player to hand appropriately """ expected = self.table.player_order[:] x = expected.pop(0) expected.append(x) x = expected.pop(0) expected.append(x) self.player4.active = False app.move_button(self.table) self.player4.active = True app.move_button(self.table) self.assertEqual(len(self.table.player_order), 6) self.assertEqual(expected, self.table.player_order)
def test_set_missed_bb(self): """ Can we set missed bb to True """ self.player3.active = False app.move_button(self.table) self.assertTrue(self.player3.missed_bb)
def test_remove_inactive_from_hand(self): """ Can we remove an inactive player from a hand """ self.player4.active = False app.move_button(self.table) self.assertEqual(len(self.table.player_order), 5)
def test_set_missed_sb(self): """ Can we set missed sb to True """ self.player2.active = False self.player2.acted = True app.move_button(self.table) self.assertTrue(self.player2.missed_sb)