How to Mock a mongodb

Xavier Pegenaute xpegenaute at telepolis.es
Sat Feb 7 17:09:02 EST 2015


Dear,

I am trying to mock the use of a mongo db and I am having some trouble. 
Appears that I am not able to return a desired value from 
mongo.find().count(). I made a proof of concept to try to reduce 
complexity of the real problem.

You can find the code which is going to be tested in [1], and the code 
of the test case in [2].

Do you know exactly wat's wrong with it?, or may you point me to some 
direction?

Thanks,
Xavi
[1] - http://pastebin.com/0vGqsURk
[2] - http://pastebin.com/6Y6K4dUn



More information about the Python-list mailing list