args = (,) keywargs = {} @wraps(func) def patched(*args, **keywargs): > with self.decoration_helper(patched, args, keywargs) as (newargs, newkeywargs): ../.pyenv/versions/3.12.12/lib/python3.12/unittest/mock.py:1393: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../.pyenv/versions/3.12.12/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ ../.pyenv/versions/3.12.12/lib/python3.12/unittest/mock.py:1375: in decoration_helper arg = exit_stack.enter_context(patching) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../.pyenv/versions/3.12.12/lib/python3.12/contextlib.py:526: in enter_context result = _enter(cm) ^^^^^^^^^^ ../.pyenv/versions/3.12.12/lib/python3.12/unittest/mock.py:1467: in __enter__ original, local = self.get_original() ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def get_original(self): target = self.getter() name = self.attribute original = DEFAULT local = False try: original = target.__dict__[name] except (AttributeError, KeyError): original = getattr(target, name, DEFAULT) else: local = True if name in _builtins and isinstance(target, ModuleType): self.create = True if not self.create and original is DEFAULT: > raise AttributeError( "%s does not have the attribute %r" % (target, name) ) E AttributeError: does not have the attribute 'DBAccounting' ../.pyenv/versions/3.12.12/lib/python3.12/unittest/mock.py:1437: AttributeError