On 8/3/07, Tomasz Nazar <[EMAIL PROTECTED]> wrote:
> In short:
> Using Pylons 0.9.5 + SQLAlchemy + SaContext
> When running app or tests all is OK.
> But after change from pylons.database to sacontext for each 'nosetests
> test_*.py' I get a "configuration error" in addition: "AttributeError:
> No configuration has been registered for this process or thread" (full
> error below)
SAContext hasn't been tested with the Pylons testing mode, so I'm
afraid you're on your own here. I'm up to my ears upgrading my app to
Pylons 0.9.6 and deciding how to structure SAContext for SQLAlchemy
0.4. People have occasionally gotten this error running Pylons tests,
and have copied the config-initialization lines from websetup.py to
somewhere in their test code:
conf = paste.deploy.appconfig('config:' + filename)
conf.update(dict(app_conf=conf.local_conf, global_conf=conf.global_conf))
paste.deploy.CONFIG.push_process_config(conf)
Pylons 0.9.6rc1 is using pylons.config instead of paste.deploy.CONFIG
but I'm not sure how exactly to change one's code for it.
Your error messages suggest those two tests are not testing whatever
they're supposed to test, since they're aborting at an early stage.
--
Mike Orr <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---