def delete(self, doc):
        if doc.id is None:
            raise DatabaseException('Document does not have id')
        if doc.sid is None:
            try:
                rs = self.db.docs.remove({'id': doc.id}, safe=True)
                assert rs['n'] == 1
            except Exception as e:
                raise DatabaseException(e)
            return None
        doc.data = None
        return self.update(doc)
def test_get_translation_language_codes_that_need_reviewers_for_multi_lang(
            self):
        stats = suggestion_services.get_community_contribution_stats()
        stats.set_translation_suggestion_count_for_language_code('hi', 1)
        stats.set_translation_suggestion_count_for_language_code('fr', 1)

        language_codes_that_need_reviewers = (
            stats.get_translation_language_codes_that_need_reviewers()
        )

        self.assertEqual(
            language_codes_that_need_reviewers, {'hi', 'fr'})