I wonder what is the good practice to test my model layer based on 
sqlalchemy in repoze.bfg framework.

In Pylons project, ``development.ini`` is the configuration used in 
development mode.
``test.ini`` is the configuration used in test mode (when I launch 

So, ``development.db`` is used in dev mode and ``test.db`` is used in 
test mode.

In my ``repoze.bfg`` project, I've only ``my_project_name.ini`` config file.

This is my ``models.py`` file :


This is the beginning of ``test_models.py`` file :


How can I get SQLAlchemy ``session`` object connected on ``test.db`` in 
my ``test_models.py`` file ?

I would like execute my test with nose (or better solution if exist).

What is the good method ? The good pattern in repoze.bfg context ?

Thanks for your help,
Stéphane Klein <steph...@harobed.org>
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com

Repoze-dev mailing list

Reply via email to