Esempio n. 1
0
 def __init__(self, mocked_obj=None, strict=True):
   self.invocations = []
   self.stubbed_invocations = []
   self.original_methods = []
   self.stubbing = None
   self.verification = None
   if mocked_obj is None:
       mocked_obj = Dummy()
       strict = False
   self.mocked_obj = mocked_obj
   self.strict = strict
   
   mock_registry.register(self)
Esempio n. 2
0
    def __init__(self, mocked_obj=None, strict=True):
        self.invocations = []
        self.stubbed_invocations = []
        self.original_methods = []
        self.stubbing = None
        self.verification = None
        if mocked_obj is None:
            mocked_obj = Dummy()
            strict = False
        self.mocked_obj = mocked_obj
        self.strict = strict

        mock_registry.register(self)
Esempio n. 3
0
    def __init__(self, mocked_obj=None, strict=True, chainable=False):
        self.invocations = []
        self.stubbed_invocations = []
        self.original_methods = []
        self.stubbing = None
        self.verification = None
        if mocked_obj is None:
            mocked_obj = _Dummy()
            strict = False
        self.mocked_obj = mocked_obj
        self.strict = strict
        self.stubbing_real_object = False
        if zi is not None:
            self.zi = isinstance(mocked_obj, zi.interface.InterfaceClass)
        else:
            self.zi = False
        self.chainable = chainable

        mock_registry.register(self)
Esempio n. 4
0
    def __init__(self, mocked_obj=None, strict=True, chainable=False):
        self.invocations = []
        self.stubbed_invocations = []
        self.original_methods = []
        self.stubbing = None
        self.verification = None
        if mocked_obj is None:
            mocked_obj = _Dummy()
            strict = False
        self.mocked_obj = mocked_obj
        self.strict = strict
        self.stubbing_real_object = False
        if zi is not None:
            self.zi = isinstance(mocked_obj, zi.interface.InterfaceClass)
        else:
            self.zi = False
        self.chainable = chainable

        mock_registry.register(self)