def test_remove_all_observers(self): """White-box test for remove_all_observers""" for i in range(10): Observer("TYPE", None, center=shared_center) self.assert_(len(shared_center.observers[("TYPE", None)]) >= 10, "observers registered") shared_center.remove_all_observers() self.assert_(len(shared_center.observers) == 0, "observers removed")
def test_remove_all_observers(self): """White-box test for remove_all_observers""" for i in xrange(10): Observer('TYPE', None, center=shared_center) self.assert_(len(shared_center.observers[('TYPE',None)]) >= 10, "observers registered") shared_center.remove_all_observers() self.assert_(len(shared_center.observers) == 0, "observers removed")
def tearDown(self): shared_center.remove_all_observers()