Example #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 == ""
Example #2
0
 def setup (self):
     self.slp = PollingServiceLocator()