Ejemplo n.º 1
0
def app(config, tmpdir):
    from spreadsplug.web import setup_app, setup_logging, setup_signals, app
    from spreadsplug.web.web import event_queue
    config.load_defaults(overwrite=False)

    config['web']['mode'] = 'full'
    config['web']['project_dir'] = unicode(tmpdir.join('workflows'))
    config['web']['debug'] = False
    config['web']['standalone_device'] = True
    setup_app(config)
    setup_logging(config)
    with mock.patch('spreadsplug.web.task_queue') as mock_tq:
        mock_tq.task.return_value = lambda x: x
        setup_signals()
    app.config['TESTING'] = True
    event_queue.clear()
    yield app
Ejemplo n.º 2
0
def app(config, tmpdir):
    from spreadsplug.web import setup_app, setup_logging, setup_signals, app
    from spreadsplug.web.web import event_queue
    config.load_defaults(overwrite=False)

    config['web']['mode'] = 'full'
    config['web']['project_dir'] = unicode(tmpdir.join('workflows'))
    config['web']['debug'] = False
    config['web']['standalone_device'] = True
    setup_app(config)
    setup_logging(config)
    with mock.patch('spreadsplug.web.task_queue') as mock_tq:
        mock_tq.task.return_value = lambda x: x
        setup_signals()
    app.config['TESTING'] = True
    event_queue.clear()
    yield app
Ejemplo n.º 3
0
def app(config, tmpdir):
    import spreadsplug.web.persistence as persistence
    from spreadsplug.web import setup_app, setup_logging, setup_signals, app
    from spreadsplug.web.web import event_queue
    config.load_defaults(overwrite=False)

    config['web']['mode'] = 'full'
    config['web']['database'] = unicode(tmpdir.join('test.db'))
    config['web']['project_dir'] = unicode(tmpdir)
    config['web']['debug'] = False
    config['web']['standalone_device'] = True
    setup_app(config)
    setup_logging(config)
    setup_signals()
    app.config['TESTING'] = True
    event_queue.clear()
    persistence.WorkflowCache = {}
    yield app
Ejemplo n.º 4
0
def app(config, tmpdir):
    import spreadsplug.web.persistence as persistence
    from spreadsplug.web import setup_app, setup_logging, setup_signals, app
    from spreadsplug.web.web import event_queue
    config.load_defaults(overwrite=False)

    config['web']['mode'] = 'full'
    config['web']['database'] = unicode(tmpdir.join('test.db'))
    config['web']['project_dir'] = unicode(tmpdir)
    config['web']['debug'] = False
    config['web']['standalone_device'] = True
    setup_app(config)
    setup_logging(config)
    setup_signals()
    app.config['TESTING'] = True
    event_queue.clear()
    persistence.WorkflowCache = {}
    yield app