Ticket #10753: fix.diff
File fix.diff, 1.4 KB (added by , 16 years ago) |
---|
-
django/dispatch/dispatcher.py
124 124 (r_key, _) = self.receivers[index] 125 125 if r_key == lookup_key: 126 126 del self.receivers[index] 127 break 127 128 128 129 def send(self, sender, **named): 129 130 """Send signal from sender to all connected receivers. -
tests/regressiontests/dispatch/tests/test_dispatcher.py
102 102 self.assertEqual(err.args, ('this',)) 103 103 a_signal.disconnect(fails) 104 104 self._testIsClean(a_signal) 105 106 def testDisconnection(self): 107 receiver_1 = Callable() 108 receiver_2 = Callable() 109 receiver_3 = Callable() 105 110 111 a_signal.connect(receiver_1) 112 a_signal.connect(receiver_2) 113 a_signal.connect(receiver_3) 114 115 a_signal.disconnect(receiver_1) 116 del receiver_2 117 garbage_collect() 118 a_signal.disconnect(receiver_3) 119 self._testIsClean(a_signal) 120 106 121 def getSuite(): 107 122 return unittest.makeSuite(DispatcherTests,'test') 108 123