My code is fairly simple but i don't understand what is going on :
class MyDb :def some_func( arg ) :....
while my test code is :
@mock.patch(mypkg.mydb)
@pytest.mark.parametrize( func_dummy_value ) :( [ { "id" : 1234 } ] )
def test_simple ( mock_db , dummy_value ) :mock_db.some_func.return_value = dummy_value
So from where I call it I do have sth like :
db = MyDb()
print db
print db.some_func()
I was expecting the last one to print the dummy value I have given when running the test. Instead I get :
<MagicMock name='MyDb()' id='140018446236496'>
<MagicMock name='MyDb().some_func()' id='140018443991696'>
what am I missing?