'Tests vote_count increases and decreases correctly from the same user'

@ddt.data(*itertools.product([True, False], [True, False], [True, False]))
@ddt.unpack
def test_vote_count(self, current_vote_status, first_vote, second_vote):

    starting_vote_count = 0
    if current_vote_status:
        self.register_get_user_response(self.user, upvoted_ids=['test_comment'])
        starting_vote_count = 1
    self.register_comment_votes_response('test_comment')
    self.register_comment(overrides={'votes': {'up_count': starting_vote_count}})
    data = {'voted': first_vote}
    result = update_comment(self.request, 'test_comment', data)
    self.register_comment(overrides={'voted': first_vote})
    self.assertEqual(result['vote_count'], (1 if first_vote else 0))
    data = {'voted': second_vote}
    result = update_comment(self.request, 'test_comment', data)
    self.assertEqual(result['vote_count'], (1 if second_vote else 0))
