Patching imported module that is within function (python - mock)

前端 未结 0 1083
温柔的废话
温柔的废话 2020-11-29 19:20

I have a problem while I write test code. I had to import within function.

# aaa.py
def abc():
    import Apple
    import Banana

    a = apple()
    a.eat()         


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