I use my unit tests using my nose.
I have .ini files such as production.ini, development.ini, local.ini. Finally, I have a test.ini file that looks like this:
[app:main] use = config:local.ini # Add additional test specific configuration options as necessary. sqlalchemy.url = sqlite:///%(here)s/tests.db
In my test class, I want to configure the database in the same way as in my application server code. Sort of:
engine = engine_from_config(settings) initialize_sql(engine) dbfixture = SQLAlchemyFixture( env=model, engine=engine, style=NamedDataStyle() )
How does the nose pass the βsettingsβ into my test code?
I read the following link for some recommendations, but I was not able to connect all the dots. http://farmdev.com/projects/fixture/using-fixture-with-pylons.html
Thanks a lot!
source share