Python and database unittests
Simon Brunning
simon at brunningonline.net
Wed Aug 27 04:26:48 EDT 2008
2008/8/27 Marco Bizzarri <marco.bizzarri at gmail.com>:
> 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.
Clearly you need integration tests as well as unit tests, but the unit
tests ought to isolate the code under test, so stubbing out external
dependencies is the norm.
--
Cheers,
Simon B.
simon at brunningonline.net
http://www.brunningonline.net/simon/blog/
GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues | Twitter: brunns
More information about the Python-list
mailing list