title: Pyramid framework functional testing with template context
body: <p>I have written several functional tests for Pyramid framework application. The HTML response is generated using webtest. Then the test would assert whether a string exists in the body or does not.</p>
  
  <p>Additionally I would like to inspect the global variables. Since Pyramid does not use "template context" anymore, my views and mako templates rely on the request.context.</p>
  
  <p>However I don't know how to access them during a functional test using the webtest library.
  Does anyone know how to access request.context or even "template context" during functional testing?</p>
  
  <p>Here are some quotes relevant to this topic.</p>
  
  <p>"In addition to the methods on the self.app() object, Pylons also gives you access to some of the Pylons globals that have been created during the request."</p>
  
  <p>"The Pyramid structure has three major benefits:
  1(...), 2( It's simpler and more modular. No magic globals ), 3(...)"</p>