예제 #1
0
    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")
예제 #2
0
    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")
예제 #3
0
 def tearDown(self):
     shared_center.remove_all_observers()