Python pyramid.testing.setUp() Examples

The following are 30 code examples of pyramid.testing.setUp(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module pyramid.testing , or try the search function .
Example #1
Source File: test_validation.py    From pyramid_openapi3 with MIT License 6 votes vote down vote up
def setUp(self) -> None:
        """unittest.TestCase setUp for each test method.

        Setup a minimal pyramid configuration.
        """
        self.config = setUp()

        self.config.include("pyramid_openapi3")

        with tempfile.NamedTemporaryFile() as document:
            document.write(self.openapi_spec)
            document.seek(0)

            self.config.pyramid_openapi3_spec(
                document.name, route="/foo.yaml", route_name="foo_api_spec"
            ) 
Example #2
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #3
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #4
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        from svc1_first_auto_service import main
        app = main({})
        from webtest import TestApp
        self.testapp = TestApp(app) 
Example #5
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #6
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #7
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #8
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        from restful_auto_service import main
        app = main({})
        from webtest import TestApp
        self.testapp = TestApp(app) 
Example #9
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #10
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        from restful_auto_service import main
        app = main({})
        from webtest import TestApp
        self.testapp = TestApp(app) 
Example #11
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #12
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #13
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        from restful_auto_service import main
        app = main({})
        from webtest import TestApp
        self.testapp = TestApp(app) 
Example #14
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #15
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        from restful_auto_service import main
        app = main({})
        from webtest import TestApp
        self.testapp = TestApp(app) 
Example #16
Source File: tests.py    From restful-services-in-pyramid with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #17
Source File: conftest.py    From channelstream with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def pyramid_config():
    # from pyramid.request import Request
    # request = Request.blank('/', base_url='http://foo.com')
    config = testing.setUp(settings={})
    settings = config.get_settings()
    return config, settings 
Example #18
Source File: tests.py    From build-pypi-mongodb-webcast-series with MIT License 5 votes vote down vote up
def setUp(self):
        from firstpypi import main
        app = main({})
        from webtest import TestApp
        self.testapp = TestApp(app) 
Example #19
Source File: tests.py    From build-pypi-mongodb-webcast-series with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #20
Source File: tests.py    From build-pypi-mongodb-webcast-series with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #21
Source File: tests.py    From build-pypi-mongodb-webcast-series with MIT License 5 votes vote down vote up
def setUp(self):
        from pypi_web import main
        app = main({})
        from webtest import TestApp
        self.testapp = TestApp(app) 
Example #22
Source File: tests.py    From build-pypi-mongodb-webcast-series with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #23
Source File: tests.py    From build-pypi-mongodb-webcast-series with MIT License 5 votes vote down vote up
def setUp(self):
        from pypi_web import main
        app = main({})
        from webtest import TestApp
        self.testapp = TestApp(app) 
Example #24
Source File: tests.py    From build-pypi-mongodb-webcast-series with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #25
Source File: tests.py    From consuming_services_python_demos with MIT License 5 votes vote down vote up
def setUp(self):
        from consuming_services_apis import main
        app = main({})
        from webtest import TestApp
        self.testapp = TestApp(app) 
Example #26
Source File: tests.py    From consuming_services_python_demos with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp() 
Example #27
Source File: tests.py    From learning-python with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp()
        from sqlalchemy import create_engine
        engine = create_engine('sqlite://')
        from .models import (
            Base,
            MyModel,
            )
        DBSession.configure(bind=engine) 
Example #28
Source File: tests.py    From learning-python with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp()
        from sqlalchemy import create_engine
        engine = create_engine('sqlite://')
        from .models import (
            Base,
            MyModel,
            )
        DBSession.configure(bind=engine)
        Base.metadata.create_all(engine)
        with transaction.manager:
            model = MyModel(name='one', value=55)
            DBSession.add(model) 
Example #29
Source File: tests.py    From learning-python with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp()
        from sqlalchemy import create_engine
        engine = create_engine('sqlite://')
        from .models import (
            Base,
            MyModel,
            )
        DBSession.configure(bind=engine)
        Base.metadata.create_all(engine)
        with transaction.manager:
            model = MyModel(name='one', value=55)
            DBSession.add(model) 
Example #30
Source File: tests.py    From learning-python with MIT License 5 votes vote down vote up
def setUp(self):
        self.config = testing.setUp()
        from sqlalchemy import create_engine
        engine = create_engine('sqlite://')
        from .models import (
            Base,
            MyModel,
            )
        DBSession.configure(bind=engine)