Exemple #1
0
 def eval_query(self, query_string, expected_value):
     ast = cypher_parser.Parser(query_string).Cypher()
     value = cypher_parser.cypher_eval(
         ast, {"__entityset__": self.graph.vertices}
     )
     self.assertEqual(
         expected_value, value
     )
Exemple #2
0
 def eval_expression(self, query_string, expected_value, context={}):
     ast = cypher_parser.Parser(query_string).Expression()
     value = cypher_parser.cypher_eval(ast, context)
     self.assertEqual(
         expected_value, value
     )