def test_determine_update_values_none_to_down(self): upvote, downvote = determine_update_values(2, 0, 0, 0) self.assertEqual(upvote, 0) self.assertEqual(downvote, 1)
def test_determine_update_value_upvote_to_none(self): upvote, downvote = determine_update_values(1, 2, 1, 0) self.assertEqual(upvote, 0) self.assertEqual(downvote, 0)
def test_determine_update_values_down_to_up(self): upvote, downvote = determine_update_values(0, 1, 0, 1) self.assertEqual(upvote, 1) self.assertEqual(downvote, 0)
def test_determine_update_values_no_effect(self): upvote, downvote = determine_update_values(1, 1, 1, 0) self.assertEqual(upvote, 1) self.assertEqual(downvote, 0)