itarticle python how to assert a method is called in unit test using mock/magicmock – python consulting 0