def setUp(self): Base.metadata.create_all(self.engine) self.session = self.session_maker() Initialiser(self.session).init_all() create_data(self.session) self.provider = SQLAlchemyProvider( {'id': 'SOORTEN', 'conceptscheme_id': 1}, self.session_maker, uri_generator=UriPatternGenerator('urn:x-skosprovider-sa:test:%s') )
def setUp(self): Base.metadata.create_all(self.engine) self.session = self.session_maker() Initialiser(self.session).init_all() create_data(self.session) create_visitation(self.session) self.visitationprovider=SQLAlchemyProvider( {'id': 'SOORTEN', 'conceptscheme_id': 1}, self.session_maker, expand_strategy='visit' )
def setUp(self): Base.metadata.create_all(self.engine) self.session = self.session_maker() Initialiser(self.session).init_all() create_data(self.session) self.provider = SQLAlchemyProvider( { 'id': 'SOORTEN', 'conceptscheme_id': 1 }, self.session_maker, uri_generator=UriPatternGenerator('urn:x-skosprovider-sa:test:%s'))
def setUp(self): Base.metadata.create_all(self.engine) self.session = self.session_maker() Initialiser(self.session).init_all() create_data(self.session) create_visitation(self.session) self.visitationprovider = SQLAlchemyProvider( { 'id': 'SOORTEN', 'conceptscheme_id': 1 }, self.session_maker, expand_strategy='visit')
def setUp(self): settings = {'sqlalchemy.url': 'sqlite:///:memory:'} self.engine = engine_from_config(settings, prefix='sqlalchemy.') self.session_maker = sessionmaker( bind=self.engine ) Base.metadata.create_all(self.engine) session = self.session_maker() try: create_data(session) session.commit() except: session.rollback()