Exemplo n.º 1
0
 def testToLpgSmallInt(self):
     pred = "test-pred"
     obj = 1
     link = SimpleLink(pred=pred, obj=obj)
     expected_link_dict = {"test-pred": 1}
     parent = {}
     vertices = []
     edges = []
     link.to_lpg(parent, vertices, edges, "")
     self.assertDictEqual(expected_link_dict, parent)
Exemplo n.º 2
0
 def testToLpgLargeInt(self):
     pred = "test-pred"
     obj = 9223372036854775808
     link = SimpleLink(pred=pred, obj=obj)
     expected_link_dict = {"test-pred": "9223372036854775808"}
     parent = {}
     vertices = []
     edges = []
     link.to_lpg(parent, vertices, edges, "")
     self.assertDictEqual(expected_link_dict, parent)
Exemplo n.º 3
0
 def testToLpgPrefix(self):
     pred = "test-pred"
     obj = "test-obj"
     link = SimpleLink(pred=pred, obj=obj)
     expected_link_dict = {"abctest-pred": "test-obj"}
     parent = {}
     vertices = []
     edges = []
     link.to_lpg(parent, vertices, edges, "abc")
     self.assertDictEqual(expected_link_dict, parent)