예제 #1
0
class TestPollingServiceLocator (TestServiceLocator):
    
    def setup (self):
        self.slp = PollingServiceLocator()
    
    def test_check_services (self):
        self.slp.register("foo_service", "http://localhost:5900")
        location = self.slp.locate("foo_service")
        assert location == "http://localhost:5900"
        self.slp.check_services()
        location = self.slp.locate("foo_service")
        assert location == ""
예제 #2
0
 def setup (self):
     self.slp = PollingServiceLocator()