def test_nonhuman_committers_not_counted(self):
    exploration = self.save_new_valid_exploration(self.EXP_ID, feconf.SYSTEM_COMMITTER_ID, title='Original Title')
    collection = self.save_new_valid_collection(self.COL_ID, self.user_a_id)
    for system_id in constants.SYSTEM_USER_IDS:
        exp_services.update_exploration(system_id, self.EXP_ID, [exp_domain.ExplorationChange({'cmd': 'edit_exploration_property', 'property_name': 'title', 'new_value': ('Title changed by %s' % system_id)})], 'Changed title.')
        collection_services.update_collection(system_id, self.COL_ID, [{'cmd': 'edit_collection_property', 'property_name': 'title', 'new_value': 'New Exploration Title'}], 'Changed title.')
    output = self._run_one_off_job()
    self.assertEqual([['SUCCESS', 3]], output)
    exploration_summary = exp_fetchers.get_exploration_summary_by_id(exploration.id)
    collection_summary = collection_services.get_collection_summary_by_id(collection.id)
    for system_id in constants.SYSTEM_USER_IDS:
        self.assertNotIn(system_id, exploration_summary.contributors_summary)
        self.assertNotIn(system_id, exploration_summary.contributor_ids)
        self.assertNotIn(system_id, collection_summary.contributors_summary)
        self.assertNotIn(system_id, collection_summary.contributor_ids)
def test_nonhuman_committers_not_counted(self):
    exploration = self.save_new_valid_exploration(self.EXP_ID, feconf.SYSTEM_COMMITTER_ID, title='Original Title')
    collection = self.save_new_valid_collection(self.COL_ID, self.user_a_id)
    for system_id in constants.SYSTEM_USER_IDS:
        exp_services.update_exploration(system_id, self.EXP_ID, [exp_domain.ExplorationChange({'cmd': 'edit_exploration_property', 'property_name': 'title', 'new_value': ('Title changed by %s' % system_id)})], 'Changed title.')
        collection_services.update_collection(system_id, self.COL_ID, [{'cmd': 'edit_collection_property', 'property_name': 'title', 'new_value': 'New Exploration Title'}], 'Changed title.')
    output = self._run_one_off_job()
    self.assertEqual([['SUCCESS', 3]], output)
    exploration_summary = exp_fetchers.get_exploration_summary_by_id(exploration.id)
    collection_summary = collection_services.get_collection_summary_by_id(collection.id)
    for system_id in constants.SYSTEM_USER_IDS:
        self.assertNotIn(system_id, exploration_summary.contributors_summary)
        self.assertNotIn(system_id, exploration_summary.contributor_ids)
        self.assertNotIn(system_id, collection_summary.contributors_summary)
        self.assertNotIn(system_id, collection_summary.contributor_ids)