summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-02-24 01:35:35 +0200
committerLV-426 <lv-426@taproot.org.il>2015-02-24 01:35:35 +0200
commit11fca26a64d09a50fb406280c71ee634de036a9f (patch)
tree772fa096daf3a49f0ea312f0e2396fb16d4220d3 /src
parent9ad4624c8d479106081d95c571c44a6d4d8af943 (diff)
domain_cri.py: fixing link proficiency level attr, cvs export
Diffstat (limited to 'src')
-rw-r--r--src/local/domain/cri/domain_cri.py2
-rw-r--r--src/local/domain/cri/test_domain__CRI.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/local/domain/cri/domain_cri.py b/src/local/domain/cri/domain_cri.py
index 5b13d7bb..db6ed925 100644
--- a/src/local/domain/cri/domain_cri.py
+++ b/src/local/domain/cri/domain_cri.py
@@ -132,7 +132,7 @@ class DBO_random_data_generation__domain__CRI(DB_op):
'where rand() < %.2f' % (prob_link_create),
'create (n)-[r:%s' % (skill_level),
'{id: \'test-id_\' + toString(%d + toInt(%d * rand())),' % (min_id, lim_r * 100000), # aim for low id collision probability,
- 'proficiency: \'%s\'}' % (len(skill_level) - 1),
+ 'proficiency: \'%s\'}' % (skill_level),
']->(m)',
'return collect(r.id)',
]
diff --git a/src/local/domain/cri/test_domain__CRI.py b/src/local/domain/cri/test_domain__CRI.py
index 418c8aef..54131bbd 100644
--- a/src/local/domain/cri/test_domain__CRI.py
+++ b/src/local/domain/cri/test_domain__CRI.py
@@ -32,7 +32,7 @@ class Test_Domain_CRI(unittest.TestCase):
q_arr = ['match (n: Person)',
'with n',
- 'match (n)-[r:Knows]->(m:Skill)',
+ 'match (n)-[r:Novice|Intermediate|Expert]->(m:Skill)', # [!] expect link type to be proficiency level
'return n.name, collect({skill_name: m.name, skill_level: r.proficiency})'
]
op = DBO_cypher_query(q_arr)