[TIP] Using DB on tests without orm

marrese at gmail.com marrese at gmail.com
Thu Jul 21 12:07:03 PDT 2011


Hi,

I'm lookin for a better way to do testing in the project I'm currently
working on.
We have a project that uses MySQL as database, and we have in there a
set of databases we use on development and a single database that is
used for the tests. This test database includes many tables from the
development databases.

I didn't like this schema, but didn't find a better solution that
suits our needs in a better way.

Today we decided to look for a better approach.
The first thing I thought about was to use sqlite3 and do all the
testing in there, but I can't find a decent way to migrate data
between mysql and sqlite (and I think I will have to do this on
regular basis)

Mocks are good, but we have tons of tables so they are annoying to
maintain (don't get me wrong, we are using them, just not for
everything)

Because of implementation decisions, we use straight db calls instead of an ORM.

Does anyone have a TIP ( :) ) about this?

Thanks,
-- 
Martín

http://www.kyheo.com.ar
GTalk: marrese at gmail.com



More information about the testing-in-python mailing list