コード例 #1
0
 def _modify_user(self):
     from example.model import User, Session
     session = Session()
     user = session.query(User).get(1)
     user.name = 'Bob Marley'
     session.commit()
     session.close()
コード例 #2
0
ファイル: test_cache.py プロジェクト: hadrien/pyramid_caching
 def _modify_user(self):
     from example.model import User, Session
     session = Session()
     user = session.query(User).get(1)
     user.name = 'Bob Marley'
     session.commit()
     session.close()
コード例 #3
0
 def setUp(self):
     from example.model import User, Session
     registry = self.config.registry
     registry.registerUtility(TestSerializer(), ISerializer)
     self.app
     session = Session()
     session.add(User(id=1, name='Bob'))
     session.commit()
コード例 #4
0
    def setUp(self):
        os.environ['CACHING_ENABLED'] = 'false'

        # creating app to setup cache and decorate stuff.
        self.app
        from example.model import User, Session
        session = Session()
        session.add(User(id=1, name='Bob'))
        session.commit()
コード例 #5
0
    def setUp(self):
        os.environ['CACHING_ENABLED'] = 'false'

        # creating app to setup cache and decorate stuff.
        self.app
        from example.model import User, Session
        session = Session()
        session.add(User(id=1, name='Bob'))
        session.commit()
コード例 #6
0
    def setUp(self):
        # creating app to setup cache and decorate stuff.
        self.app
        from example.model import User, Session
        session = Session()
        session.add(User(id=1, name='Bob'))
        session.commit()
        session.close()

        self.cache_client.client.delete('cache')
コード例 #7
0
ファイル: test_cache.py プロジェクト: hadrien/pyramid_caching
    def setUp(self):
        # creating app to setup cache and decorate stuff.
        self.app
        from example.model import User, Session
        session = Session()
        session.add(User(id=1, name='Bob'))
        session.commit()
        session.close()

        self.cache_client.client.delete('cache')