def test_resolve_2(self): index = indexer.crawl(indexer.build(self.rels2)) self.assertEqual(indexer.resolve(index), { 'a': { 'b': ( ('a', 'b'), ), 'c': ( ('a', 'c'), ), }, 'b': { 'a': ( ('b', 'a'), ), 'c': ( ('b', 'a'), ('a', 'c'), ), }, 'c': { 'a': ( ('c', 'a'), ), 'b': ( ('c', 'a'), ('a', 'b'), ) }, })
def test_resolve_1(self): index = indexer.crawl(indexer.build(self.rels1)) self.assertEqual( indexer.resolve(index), { "a": {"b": (("a", "b"),), "c": (("a", "b"), ("b", "c"))}, "b": {"a": (("b", "a"),), "c": (("b", "c"),)}, "c": {"b": (("c", "b"),), "a": (("c", "b"), ("b", "a"))}, }, )
def test_resolve_3(self): index = indexer.crawl(indexer.build(self.rels3)) self.assertEqual(indexer.resolve(index), { 'a': { 'b': ( ('a', 'b', {}), ), }, 'b': { 'a': ( ('b', 'a', {}), ), } })
def test_none(self): self.assertEqual(indexer.resolve({}), {})
def test_resolve_3(self): index = indexer.crawl(indexer.build(self.rels3)) self.assertEqual(indexer.resolve(index), {"a": {"b": (("a", "b", {}),)}, "b": {"a": (("b", "a", {}),)}})