Python Patch as Decorator vs. Context

前端 未结 0 1189

I\'m attempting to use @patch as a test decorator, but I\'m having trouble. This works:

def test_desc(self):
    with patch(\'class.func\') as class_func_mock         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题