示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 def test_dotless_path(self):
     paths = [["id"], ["name"]]
     expected = {"id": "", "name": ""}
     self.assertEquals(merge_paths(paths), expected)
示例#4
0
 def test_dotless_path(self):
     paths = [["id"], ["name"]]
     expected = {"id": "", "name": ""}
     self.assertEquals(merge_paths(paths), expected)