returned a non-iterable (type Mock)
Как поправить?
Модель. Мне нужно, чтобы оно вернуло 'some_id'
покажи код и ошибку
try: response = self._make_request(url=url, data=data) new_branch_id = schemas.SchemaCreateBranch(**response).id self.logger.success('New branch was successfully created!') return new_branch_id except Exception as e: self.logger.critical(f'Failed to create new hotfix/{self.version} branch: {e}') raise e Error Traceback (most recent call last): File "/usr/lib/python3.8/unittest/mock.py", line 1325, in patched return func(*newargs, **newkeywargs) File "/src/docker-patch-maker/tests/tests.py", line 29, in test__create_branch result = self.creator._create_branch() File "/src/docker-patch-maker/create_patch.py", line 48, in _create_branch raise e File "/src/docker-patch-maker/create_patch.py", line 43, in _create_branch new_branch_id = schemas.SchemaCreateBranch(**response).id TypeError: Mock.keys() returned a non-iterable (type Mock)
response - это что?
Обсуждают сегодня