Exemplo n.º 1
0
 def test_single_items(self):
     for path in (
         "store.bicycle.color",
         "$.store.bicycle.color",
         "$['store']['bicycle']['color']",
         ):
         result = list(querypath.items(self.obj, path))
         expected = [("store.bicycle.color", "red")]
         self.assertItemsEqual(result, expected)
Exemplo n.º 2
0
 def test_root_items(self):
     path = "$"
     result = list(querypath.items(self.obj, path))
     expected = [('$', self.obj)]
     self.assertItemsEqual(result, expected)