diff options
| author | LV-426 <lv-426@taproot.org.il> | 2015-04-25 16:46:58 +0300 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2015-04-25 16:46:58 +0300 |
| commit | be54e302fc2fb99f10696a58f5856b1973d597ef (patch) | |
| tree | 6256ad3d751d1a0505236cab51b335d2eb79ca79 /src | |
| parent | ea77e314c0177956fa897e198e7c77c54368b751 (diff) | |
test_neo4j_cypher: add unicode statement tests
Diffstat (limited to 'src')
| -rw-r--r-- | src/server-tests/test_neo4j_cypher.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/server-tests/test_neo4j_cypher.py b/src/server-tests/test_neo4j_cypher.py index bf40bc85..75f98a5b 100644 --- a/src/server-tests/test_neo4j_cypher.py +++ b/src/server-tests/test_neo4j_cypher.py @@ -1,3 +1,5 @@ +# coding=utf-8 # TODO: rm on python 3 migration + import unittest from db_op import DBO_rzdoc__clone, DBO_add_node_set, DBO_add_link_set, \ @@ -78,8 +80,8 @@ class Test_DB_Op(unittest.TestCase): # parser = Cypher_Parser() exp_set = [ - 'match (n) with n order by n.id skip 0 limit 2 optional match (n)-[r]->(m) return n,labels(n),collect([m.id, r, type(r)])', 'create (n:A)-[r:B]->(m:C:D), ({a: 0, b: \'b\'})', + 'match (n) with n order by n.id skip 0 limit 2 optional match (n)-[r]->(m) return n,labels(n),collect([m.id, r, type(r)])', 'match (src {id: {src}.id}), (dst {id: {dst}.id})', 'match (n {id: {id_foo}})', 'match ()', @@ -87,9 +89,16 @@ class Test_DB_Op(unittest.TestCase): 'match (n), ()-[r]-()', 'match ()-[:A]->()', 'match (n:`T_nMu7ktxW` {node_attr})', - 'match (n:A:B)-[r_b:Knows {a: \'0\'}]-(m:Skill), (n)-[]-(m)' - ] + 'match (n:A:B)-[r_b:Knows {a: \'0\'}]-(m:Skill), (n)-[]-(m)', + # + # UNICODE tests + # + u'create (n:א)-[r:ב]->(m:ג:ד)', + u'create ({א: 0})', + u'create ({א: 0, נ: \'ערך ב\'})', + ] + # exp_set = [] for clause in exp_set: pt = parser.parse_expression(clause) validate_parse_tree(pt, clause) @@ -100,6 +109,7 @@ class Test_DB_Op(unittest.TestCase): # test_label = neo4j_test_util.rand_label() op_set = self.gen_full_db_op_set(test_label) + # op_set = [] for op in op_set: if isinstance(op, DB_composed_op): continue |
