@mock.patch('app.award_points', mock.MagicMock(return_value=True))
def test_no_one_has_cards_left(self):
    '\n        Kathy just hit 24, and everyone is out of cards\n\n        Expected: Kathy gets 1 point for go, and it is now time to score hands\n        '
    fake_redis = fakeredis.FakeRedis()
    game_dict = {'cards': CARDS, 'first_to_score': 'tom', 'hands': {'kathy': [], 'tom': []}, 'pegging': {'cards': ['75e734d054', '60575e1068', '1d5eb77128'], 'last_played': 'kathy', 'passed': [], 'run': [], 'total': 24}, 'players': {'tom': 0, 'kathy': 2}, 'scoring_stats': {'kathy': {'a_play': 0, 'b_hand': 0, 'c_crib': 0}, 'tom': {'a_play': 0, 'b_hand': 0, 'c_crib': 0}}, 'turn': 'kathy', 'winning_score': 121}
    fake_redis.set('test', json.dumps(game_dict))
    bev.cache = fake_redis
    bev.next_player('test')
    g = json.loads(fake_redis.get('test'))
    assert (g['players']['kathy'] == 3)
    assert (g['pegging']['total'] == 0)
    assert (g['state'] == 'SCORE')
    assert (g['turn'] == 'tom')
Kathy just hit 24, and everyone is out of cards

Expected: Kathy gets 1 point for go, and it is now time to score hands
@mock.patch('app.award_points', mock.MagicMock(return_value=True))
def test_no_one_has_cards_left(self):
    '\n        Kathy just hit 24, and everyone is out of cards\n\n        Expected: Kathy gets 1 point for go, and it is now time to score hands\n        '
    fake_redis = fakeredis.FakeRedis()
    game_dict = {'cards': CARDS, 'first_to_score': 'tom', 'hands': {'kathy': [], 'tom': []}, 'pegging': {'cards': ['75e734d054', '60575e1068', '1d5eb77128'], 'last_played': 'kathy', 'passed': [], 'run': [], 'total': 24}, 'players': {'tom': 0, 'kathy': 2}, 'scoring_stats': {'kathy': {'a_play': 0, 'b_hand': 0, 'c_crib': 0}, 'tom': {'a_play': 0, 'b_hand': 0, 'c_crib': 0}}, 'turn': 'kathy', 'winning_score': 121}
    fake_redis.set('test', json.dumps(game_dict))
    bev.cache = fake_redis
    bev.next_player('test')
    g = json.loads(fake_redis.get('test'))
    assert (g['players']['kathy'] == 3)
    assert (g['pegging']['total'] == 0)
    assert (g['state'] == 'SCORE')
    assert (g['turn'] == 'tom')