Testing with SQL Alchemy and sqlahelper

2012-01-26 Thread Jason
Hello, I am trying to do unit tests of my handler actions (using pyramid_handlers) and I would like the test method and the view-callable to use the same database transaction which gets rolled back after each test. I have a test fixture that creates a database engine in the setUp method: def

Re: Testing with SQL Alchemy and sqlahelper

2012-01-26 Thread Michael Merickel
I'd suggest you write your unit tests in a transactional way. setUp will begin a transaction and tearDown rollback the transaction. This will allow you to setup the database once, and have it in the original state at the start of each test. This means doing the population of the database,