Beispiel #1
0
    def setUp(self):

        # init an in-memory database
        self.db = dbschema.connect(':memory:')
        dbschema.create_tables(self.db)
        self.products = dbschema.sample_data(self.db)
        if 'beaker.session' in request.environ:
            del request.environ['beaker.session']
Beispiel #2
0
    def setUp(self):
        session_opts = {
            'session.type': 'memory',
        }
        beaker_app = beaker.middleware.SessionMiddleware(
            main.app, session_opts)

        self.app = TestApp(beaker_app)
        self.db = dbschema.connect(DATABASE_NAME)
        dbschema.create_tables(self.db)
        self.products = dbschema.sample_data(self.db)
Beispiel #3
0
    def setUp(self):

        # init an in-memory database
        self.db = dbschema.connect(':memory:')
        dbschema.create_tables(self.db)
        self.products = dbschema.sample_data(self.db)
 def setUp(self):
     self.app = TestApp(main.app)
     self.db = dbschema.connect(DATABASE_NAME)
     dbschema.create_tables(self.db)
     self.products = dbschema.sample_data(self.db)