def test_search_nodes_by_value_and_property_in_list(self): new_properties = {'test': ['hello', 'world']} core.set_node_properties(self.neo4jdb, handle_id='1', new_properties=new_properties) result = core.search_nodes_by_value(self.neo4jdb, value='hel', prop='test') for node in result: self.assertEqual(node.get('test'), ['hello', 'world']) return self.assertTrue(False, 'Nothing found')
def test_get_nodes_by_value_and_property_int(self): new_properties = {'test': 3} core.set_node_properties(self.neo4jdb, handle_id='1', new_properties=new_properties) result = core.get_nodes_by_value(self.neo4jdb, value=3, prop='test') for node in result: self.assertEqual(node.get('test'), 3) return self.assertTrue(False, 'Nothing found')
def test_set_node_properties(self): new_properties = {'test': 'hello world'} core.set_node_properties(self.neo4jdb, handle_id='1', new_properties=new_properties) node = core.get_node(self.neo4jdb, handle_id='1') new_properties.update({'handle_id': '1'}) self.assertEqual(node, new_properties)
def test_search_nodes_by_value_and_property_in_list(self): new_properties = {'test': ['hello', 'world']} core.set_node_properties(self.neo4jdb, handle_id='1', new_properties=new_properties) result = core.search_nodes_by_value(self.neo4jdb, value='hel', prop='test') all_results = [r for r in result] self.assertEqual(len(all_results), 1) node = all_results[0] self.assertEqual(node.get('test'), ['hello', 'world'])
def test_get_nodes_by_value_and_property_int(self): new_properties = {'test': 3} core.set_node_properties(self.neo4jdb, handle_id='1', new_properties=new_properties) result = core.get_nodes_by_value(self.neo4jdb, value=3, prop='test') all_results = [r for r in result] self.assertEqual(len(all_results), 1) node = all_results[0] self.assertEqual(node.get('test'), 3)
def test_search_nodes_by_value_and_property(self): new_properties = {'test': 'hello world'} core.set_node_properties(self.neo4jdb, handle_id='1', new_properties=new_properties) result = core.search_nodes_by_value(self.neo4jdb, value='world', prop='test') self.assertIsNotNone(result) for node in result: self.assertEqual(node.get('test'), 'hello world') return self.assertTrue(False, 'Nothing found')
def test_search_nodes_by_value(self): new_properties = {'test': 'hello world'} core.set_node_properties(self.neo4jdb, handle_id='1', new_properties=new_properties) result = core.search_nodes_by_value(self.neo4jdb, value='world') all_results = [r for r in result] self.assertEqual(len(all_results), 1) node = all_results[0] self.assertEqual(node.get('test'), 'hello world')
def test_search_nodes_by_value(self): new_properties = {'test': 'hello world'} core.set_node_properties(self.neo4jdb, handle_id='1', new_properties=new_properties) result = core.search_nodes_by_value(self.neo4jdb, value='world') self.assertIsNotNone(result) for node in result: self.assertEqual(node.get('test'), 'hello world') return self.assertTrue(False, 'Nothing found')