Can you read http://docs.repoze.org/bfg/1.3/tutorials/bfgwiki2/definingviews.html#adding-tests and see if you have further questions?
On Sat, 2010-08-21 at 14:46 +0200, KLEIN Stéphane wrote: > Hi, > > 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 > ``nosetests``). > > 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 : > > http://public.hg.stephane-klein.info/hgwebdir.cgi/todo_panel/file/8be7a61ba8bc/todo_panel/models.py > > This is the beginning of ``test_models.py`` file : > > http://public.hg.stephane-klein.info/hgwebdir.cgi/todo_panel/file/8be7a61ba8bc/todo_panel/test_models.py > > 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, > Stephane _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev