def test_dotted_path(self): paths = [["rel.id"], ["rel2.rel3.id"]] expected = { "rel": defaultdict(set, id=""), "rel2": defaultdict(set, rel3=defaultdict(set, id="")) } self.assertEqual(dict(merge_paths(paths)), expected)
def test_dotted_path(self): paths = [["rel.id"], ["rel2.rel3.id"]] expected = { "rel": defaultdict(set, id=""), "rel2": defaultdict(set, rel3=defaultdict(set, id="" ) ) } self.assertEqual(dict(merge_paths(paths)), expected)
def test_dotless_path(self): paths = [["id"], ["name"]] expected = {"id": "", "name": ""} self.assertEquals(merge_paths(paths), expected)