The test suite should be using test.ini (which inherits from development.ini). Maybe you take a look at the responsive files in a fresh quickstart!
Due to your two-database setup, you surely need to use other sqlalchemy.url lines in the test.ini, I suspect that your application uses different config variable names and therefore just got the inherited values from development.ini. For testing, an sqlite database in memory is used because it is very much faster than a real db (and furthermore, the test suite should be independent of any infrastructure). Am Mittwoch, 16. Januar 2013 01:46:48 UTC+1 schrieb alonn: > > I decided to start learning how to do proper unittesting and using > nosetests. and I have some questions after encountering some very annoying > problems. > 1. state configuration: I've noticed when I'm not running nosetests from > the main project directory everything that depends on app state (such as > information from the ini file) fails. is this observation true? can I run > nosetests with app state also for a specific test file without the whole > testing suite? > > 2. app state and configuration: what ini file does nosetest refer to? > development.in, production.ini? other? > > 3. I'm using a 2 db configuration: the app inner setting are in a > mysql/sqlite db and it works also with a mssql server (I have write > permissions, but this the DB of another app = I can't temper with the > tables no matter what), also the sqlalchemy in the app works with the > dual-db configuration (after a short battle) the tests do not. I need the > db not to be erased after the testing (which just happened to > me, fortunately enpugh. and by mistake, only in the app inner db and not > in the main mssql db) > > > be glad with any help with thi > -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To view this discussion on the web visit https://groups.google.com/d/msg/turbogears/-/FvnwarMVU9cJ. 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/turbogears?hl=en.

