Thanks Mike and Alexandre for your responses. On Mon, Jan 17, 2011 at 5:27 PM, Michael Bayer <mike...@zzzcomputing.com> wrote: > Well obviously you could mock it.
I don't want to mock it because I want to check the resulting query statement. > > A few years back Jason wrote a statement "recorder/replayer" which can > simulate a DBAPI receiving/returning an exact series of statements/results, > it involves first recording the database interaction into memory and > specifically is not for mocking, though I wonder if the idea could be adapted > somehow. That's in our source tree under test/lib/engines/ReplayableSession. > > Usually for testing I use a real DB and just run the tests in a transaction > that's rolled back. This approach works very well, and is described at > http://www.sqlalchemy.org/docs/orm/session.html#joining-a-session-into-an-external-transaction > . That's good to know. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemo...@camptocamp.com http://www.camptocamp.com -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.