def configuration(request):
"""Set up a Configurator instance.
This Configurator instance sets up a pointer to the location of the
database. It also includes the models from the octojobs model package.
Finally it tears everything down, including the in-memory database.
This configuration will persist for the entire duration of your PyTest run.
"""
settings = {
'sqlalchemy.url': 'postgres:///test_jobs'}
config = testing.setUp(settings=settings)
config.include('octojobs.models')
config.include('octojobs.routes')
def teardown():
testing.tearDown()
request.addfinalizer(teardown)
return config
评论列表
文章目录