Example #1
0
 def __call__(self, environ, start_response):
     """Invoke the Controller"""
     # WSGIController.__call__ dispatches to the Controller method
     # the request is routed to. This routing information is
     # available in environ['pylons.routes_dict']
     try:
         return WSGIController.__call__(self, environ, start_response)
     finally:
         Session.remove()
Example #2
0
 def test_find(self):
     user = Session.query(model.User).filter(model.User.email == self.a_user["email"]).first()
     assert user == self.user
Example #3
0
 def setUpClass(self):
     self.clean_db()
     self.user = model.User(**self.a_user)
     Session.add(self.user)
     Session.commit()