

def tearDown(self):
    signals.pre_init.disconnect(self.Author.pre_init)
    signals.post_init.disconnect(self.Author.post_init)
    signals.post_delete.disconnect(self.Author.post_delete)
    signals.pre_delete.disconnect(self.Author.pre_delete)
    signals.post_save.disconnect(self.Author.post_save)
    signals.pre_save_post_validation.disconnect(self.Author.pre_save_post_validation)
    signals.pre_save.disconnect(self.Author.pre_save)
    signals.pre_bulk_insert.disconnect(self.Author.pre_bulk_insert)
    signals.post_bulk_insert.disconnect(self.Author.post_bulk_insert)
    signals.post_delete.disconnect(self.Another.post_delete)
    signals.pre_delete.disconnect(self.Another.pre_delete)
    signals.post_save.disconnect(self.ExplicitId.post_save)
    signals.pre_bulk_insert.disconnect(self.Post.pre_bulk_insert)
    signals.post_bulk_insert.disconnect(self.Post.post_bulk_insert)
    post_signals = (len(signals.pre_init.receivers), len(signals.post_init.receivers), len(signals.pre_save.receivers), len(signals.pre_save_post_validation.receivers), len(signals.post_save.receivers), len(signals.pre_delete.receivers), len(signals.post_delete.receivers), len(signals.pre_bulk_insert.receivers), len(signals.post_bulk_insert.receivers))
    self.ExplicitId.objects.delete()
    self.assertEqual(self.pre_signals, post_signals)

dataset/ETHPy150Open MongoEngine/mongoengine/tests/test_signals.py SignalTests.tearDown/original