I am trying this, but it doesn't work. Any ideas?
def test_session(self):
from paste.registry import Registry, StackedObjectProxy
import pylons
self.registry = Registry()
self.registry.prepare()
self.session = StackedObjectProxy()
Previously Marin wrote:
On Jun 28, 8:01 pm, Wichert Akkerman [EMAIL PROTECTED] wrote:
I found that when you are writing unit tests it is essential to be able to
stuff data into session, c and request. I'm using a base class for
unittests which looks like this:
from unittest import
On Fri, Jun 27, 2008 at 6:33 AM, Marin [EMAIL PROTECTED] wrote:
I have this controller:
class HeplController(BaseController):
def index(self):
del session['user']
session.save()
return 'OK'
And I want to test if it works correctly with this test:
class
On Jun 28, 7:18 am, Shannon -jj Behrens [EMAIL PROTECTED] wrote:
* Use one action to put something into the session and then another
to make use of the session. It's a work flow.
I've always thought that Pylons should have something that does that.
ie:
instead of being a beaker object,
Previously Mike Orr wrote:
On Sat, Jun 28, 2008 at 7:19 AM, Jonathan Vanasco [EMAIL PROTECTED] wrote:
On Jun 28, 7:18 am, Shannon -jj Behrens [EMAIL PROTECTED] wrote:
* Use one action to put something into the session and then another
to make use of the session. It's a work flow.
The first method you describe seem to clash with the concept of unit
testing.
I found something here:
http://groups.google.com/group/pylons-discuss/browse_thread/thread/ec52fe65b960567/12b36231ff4dfb97?hl=enlnk=gstq=unit#12b36231ff4dfb97
But it does not work correctly, at least in pylons
I have this controller:
class HeplController(BaseController):
def index(self):
del session['user']
session.save()
return 'OK'
And I want to test if it works correctly with this test:
class TestHeplController(TestController):
def test_index(self):