How to use the pyramid.testing.tearDown function in pyramid

To help you get started, we’ve selected a few pyramid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Pylons / shootout / shootout / tests.py View on Github external
def tearDown(self):
        import transaction
        transaction.abort()
        testing.tearDown()
github liqd / adhocracy3 / src / adhocracy_frontend / adhocracy_frontend / test_init_.py View on Github external
def config(request):
    """Return dummy testing configuration."""
    config = testing.setUp()
    config.include('tzf.pyramid_yml')
    config.config_defaults('adhocracy_frontend:defaults.yaml')
    request.addfinalizer(testing.tearDown)
    return config
github getsentry / sentry-python / tests / integrations / pyramid / test_pyramid.py View on Github external
def pyramid_config():
    config = pyramid.testing.setUp()
    try:
        config.add_route("hi", "/message")
        config.add_view(hi, route_name="hi")
        yield config
    finally:
        pyramid.testing.tearDown()
github geoadmin / mf-chsdi3 / tests / integration / __init__.py View on Github external
def tearDown(self):
        testing.tearDown()
        del self.testapp
        del self.grids
github Kotti / Kotti / kotti / testing.py View on Github external
def tearDown():
    from depot.manager import DepotManager
    from kotti import events
    from kotti import security
    from kotti.message import _inject_mailer

    # These should arguable use the configurator, so they don't need
    # to be torn down separately:
    events.clear()
    security.reset()

    _inject_mailer[:] = []
    transaction.abort()
    DepotManager._clear()
    testing.tearDown()