I recently noticed that nose tests were failing with an error saying
that some models had already been created. Turns out that since the
appname/tests/__init__.py that paster creates executes a setup-app
command in the same process as it loads the app, things get
initialized twice. Models defined in init_model are affected, as are
AuthKit's models if you are using the SQLAlchemy back end.

I can hackishly set and check a global flag in init_model, but that
seems wrong and doesn't help with AuthKit. I can take the setup-app
line out, which works fine but I suppose could interfere with using
fixtures later? Anyone else had this problem?

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to