def test_discover(self): discovered = list(lib.discover()) self.assert_(discovered) self.assert_(config.HOSTNAME in [host[0] for host in discovered])
def test_statichosts(self): hosts = ["127.0.0.1:31337", "example.com:31337"] map(config.STATICHOSTS.append, hosts) discovered = list(lib.discover()) for host in hosts: self.assert_((host, host) in discovered)