def test_contributors_with_only_reverts_not_included(self):
    exploration = self.save_new_valid_exploration(self.EXP_ID, self.user_a_id, title='Exploration Title 1')
    exp_services.update_exploration(self.user_a_id, self.EXP_ID, [exp_domain.ExplorationChange({'cmd': 'edit_exploration_property', 'property_name': 'title', 'new_value': 'New Exploration Title'})], 'Changed title.')
    exp_services.update_exploration(self.user_a_id, self.EXP_ID, [exp_domain.ExplorationChange({'cmd': 'edit_exploration_property', 'property_name': 'objective', 'new_value': 'New Objective'})], 'Changed Objective.')
    exp_services.revert_exploration(self.user_b_id, self.EXP_ID, 3, 2)
    output = self._run_one_off_job()
    self.assertEqual([['SUCCESS', 1]], output)
    exploration_summary = exp_fetchers.get_exploration_summary_by_id(exploration.id)
    self.assertEqual([self.user_a_id], exploration_summary.contributor_ids)
    self.assertEqual({self.user_a_id: 2}, exploration_summary.contributors_summary)
def test_contributors_with_only_reverts_not_included(self):
    exploration = self.save_new_valid_exploration(self.EXP_ID, self.user_a_id, title='Exploration Title 1')
    exp_services.update_exploration(self.user_a_id, self.EXP_ID, [exp_domain.ExplorationChange({'cmd': 'edit_exploration_property', 'property_name': 'title', 'new_value': 'New Exploration Title'})], 'Changed title.')
    exp_services.update_exploration(self.user_a_id, self.EXP_ID, [exp_domain.ExplorationChange({'cmd': 'edit_exploration_property', 'property_name': 'objective', 'new_value': 'New Objective'})], 'Changed Objective.')
    exp_services.revert_exploration(self.user_b_id, self.EXP_ID, 3, 2)
    output = self._run_one_off_job()
    self.assertEqual([['SUCCESS', 1]], output)
    exploration_summary = exp_fetchers.get_exploration_summary_by_id(exploration.id)
    self.assertEqual([self.user_a_id], exploration_summary.contributor_ids)
    self.assertEqual({self.user_a_id: 2}, exploration_summary.contributors_summary)