'Test that signals that disconnect when being called don\'t mess future
dispatching.'

def test_disconnect_in_dispatch(self):

    (a, b) = (MyReceiver(1), MyReceiver(2))
    signals.post_save.connect(sender=Person, receiver=a)
    signals.post_save.connect(sender=Person, receiver=b)
    p = Person.objects.create(first_name='John', last_name='Smith')
    self.assertTrue(a._run)
    self.assertTrue(b._run)
    self.assertEqual(signals.post_save.receivers, [])
