@mock.patch('app.award_points', mock.MagicMock(return_value=True))
def test_everyone_has_passed_and_tom_still_has_cards(self):
    fake_redis = fakeredis.FakeRedis()
    game_dict = {'cards': CARDS, 'hands': {'kathy': ['5e1e7e60ab'], 'tom': ['95f92b2f0c']}, 'pegging': {'cards': ['75e734d054', '60575e1068', '1d5eb77128'], 'last_played': 'tom', 'passed': ['kathy', 'tom'], 'run': [], 'total': 30}, 'players': {'tom': 0, 'kathy': 0}, 'scoring_stats': {'kathy': {'a_play': 0, 'b_hand': 0, 'c_crib': 0}, 'tom': {'a_play': 0, 'b_hand': 0, 'c_crib': 0}}, 'state': 'PLAY', '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']['tom'] == 1)
    assert (g['turn'] == 'kathy')
    assert (g['pegging']['total'] == 0)
    assert (bev.get_player_action('test', g['turn']) == 'PLAY')
@mock.patch('app.award_points', mock.MagicMock(return_value=True))
def test_everyone_has_passed_and_tom_still_has_cards(self):
    fake_redis = fakeredis.FakeRedis()
    game_dict = {'cards': CARDS, 'hands': {'kathy': ['5e1e7e60ab'], 'tom': ['95f92b2f0c']}, 'pegging': {'cards': ['75e734d054', '60575e1068', '1d5eb77128'], 'last_played': 'tom', 'passed': ['kathy', 'tom'], 'run': [], 'total': 30}, 'players': {'tom': 0, 'kathy': 0}, 'scoring_stats': {'kathy': {'a_play': 0, 'b_hand': 0, 'c_crib': 0}, 'tom': {'a_play': 0, 'b_hand': 0, 'c_crib': 0}}, 'state': 'PLAY', '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']['tom'] == 1)
    assert (g['turn'] == 'kathy')
    assert (g['pegging']['total'] == 0)
    assert (bev.get_player_action('test', g['turn']) == 'PLAY')