def run(neo): import neo4j class BaseObject(object): @property def neo_service(self): return neo transactional = neo4j.transactional(BaseObject.neo_service) class MyService(BaseObject): @transactional def make_entity(self, name): return Entity( self.neo_service.node(name=name) ) class Entity(BaseObject): def __init__(self, node): self._node = node def __get__name(self): return self._node['name'] def __set__name(self, name): self._node['name'] = name name = transactional( property(__get__name, __set__name) ) perform( neo, simple_test(test, MyService(), name=__name__) )
def run(neo): perform(neo, define_verify_test(__name__, define, verify))
def run(neo, **options): postfix = timestamp() perform(neo, single_index_association, name="single" + postfix, **options) perform(neo, multiple_index_associations, name="multi" + postfix, **options)
def run(neo, **options): postfix = timestamp() perform(neo, single_index_association, name='single'+postfix, **options) perform(neo, multiple_index_associations, name='multi'+postfix, **options)
def run(neo, **options): perform(neo, define_verify_test(__name__, define, verify), **options)