Fixes broken tests after Mongodict update

Mongodict now pickles the object before adding it to the database (which I'm
still not sure if is a good idea). I changed the tests to use the Mongodict API
instead of inserting directly to the database.