<reponame>anshulkusa/pyquarkchain<filename>quarkchain/tools/tests/test_monitoring.py<gh_stars>100-1000
import unittest
from quarkchain.tools.monitoring import crawl_recursive, crawl_bfs


class TestCrawl(unittest.TestCase):
    def test_crawl(self):
        cache = {}
        res = {}
        # crawl_recursive(cache, "172.16.31.10", 38291, 38291 + 200, ip_lookup={})
        # res = crawl_bfs("172.16.31.10", 38291, 38291 + 200)
        dfs = {k: set(v) for k, v in cache.items()}
        bfs = {k: set(v) for k, v in res.items()}
        self.assertEqual(dfs, bfs)

import unittest
from quarkchain.tools.monitoring import crawl_recursive, crawl_bfs


class TestCrawl(unittest.TestCase):
    def test_crawl(self):
        cache = {}
        res = {}
        # crawl_recursive(cache, "172.16.31.10", 38291, 38291 + 200, ip_lookup={})
        # res = crawl_bfs("172.16.31.10", 38291, 38291 + 200)
        dfs = {k: set(v) for k, v in cache.items()}
        bfs = {k: set(v) for k, v in res.items()}
        self.assertEqual(dfs, bfs)
# crawl_recursive(cache, "172.16.31.10", 38291, 38291 + 200, ip_lookup={}) # res = crawl_bfs("172.16.31.10", 38291, 38291 + 200)