Pytest: How to mock a factory static method in order to return a mocked object?

后端 未结 0 1867
长情又很酷
长情又很酷 2020-12-19 03:44

I have the following class:

class Toto():

@staticmethod
def factory():
    return Toto("Toto")

def __init__(self, name):
    self.name = name

def         


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