Hi,
i have problem with some automatic tests. Simple example:
[code]
from test.tests import *
from pylons import tmpl_context as c
class TestBlaController(TestController):
def test_index(self):
response = self.app.get(url(controller='bla', action='index'))
c.test = 'dupa'
[/code]
p...@ra:~/test$ nosetests -s test/tests/functional/test_bla.py
Running setup_config() from test.websetup
E
======================================================================
ERROR: test_index (test.tests.functional.test_bla.TestBlaController)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/pako/test/test/tests/functional/test_bla.py", line 8, in
test_index
c.test = 'dupa'
File "/usr/lib/python2.5/site-packages/Paste-1.7.2-py2.5.egg/paste/
registry.py", line 140, in __setattr__
setattr(self._current_obj(), attr, value)
File "/usr/lib/python2.5/site-packages/Paste-1.7.2-py2.5.egg/paste/
registry.py", line 194, in _current_obj
'thread' % self.____name__)
TypeError: No object (name: tmpl_context or C) has been registered for
this thread
----------------------------------------------------------------------
Ran 1 test in 0.005s
FAILED (errors=1)
How to register tmpl_context? (I'm testing of course other module
where i can't change code using templates, below it's only simple
example).
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.