On Wed, Aug 27, 2008 at 4:55 AM, alex23 <[EMAIL PROTECTED]> wrote:
> Daniel <[EMAIL PROTECTED]> wrote:
>> Does anyone know about a module that acts as a database stub for
>> python unittests?
>
> It's not database-specific, but the Mock module should help you here:
>
> http://python-mock.sourceforge.net/
>
> There's even an example on that page for mocking a database.
> --
> http://mail.python.org/mailman/listinfo/python-list
>

I strongly disagree on using mocks for a database; checking sequences
of SQL statement is fragile, painful, and leads you to frustration
when the actual SQL and the generated SQL do not match.

Regards
Marco

-- 
Marco Bizzarri
http://iliveinpisa.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to