dsnap
dsnap copied to clipboard
Test failure
Describe the bug Test failure. I guess that later boto3 (here 1.34.58) releases do not play nice.
============================= test session starts ==============================
platform linux -- Python 3.12.2, pytest-8.0.2, pluggy-1.4.0
rootdir: /build/source
collected 0 items / 3 errors
==================================== ERRORS ====================================
______________________ ERROR collecting tests/test_aws.py ______________________
ImportError while importing test module '/build/source/tests/test_aws.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/fmwqa8nvva4sh18bqayzrilrzxq9fm0f-python3-3.12.2/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_aws.py:6: in <module>
from moto import mock_iam, mock_ec2
E ImportError: cannot import name 'mock_iam' from 'moto' (/nix/store/0m4kbrm9ys7wz3ffmx7fwzl5mcsf6dba-python3.12-moto-5.0.3/lib/python3.12/site-packages/moto/__init__.py). Did you mean: 'mock_aws'?
____________________ ERROR collecting tests/test_prompt.py _____________________
ImportError while importing test module '/build/source/tests/test_prompt.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/fmwqa8nvva4sh18bqayzrilrzxq9fm0f-python3-3.12.2/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_prompt.py:6: in <module>
from moto import mock_iam, mock_ec2
E ImportError: cannot import name 'mock_iam' from 'moto' (/nix/store/0m4kbrm9ys7wz3ffmx7fwzl5mcsf6dba-python3.12-moto-5.0.3/lib/python3.12/site-packages/moto/__init__.py). Did you mean: 'mock_aws'?
___________________ ERROR collecting tests/test_snapshot.py ____________________
ImportError while importing test module '/build/source/tests/test_snapshot.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/fmwqa8nvva4sh18bqayzrilrzxq9fm0f-python3-3.12.2/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_snapshot.py:10: in <module>
from .test_aws import session, boto_conf, aws_credentials # noqa: F401
tests/test_aws.py:6: in <module>
from moto import mock_iam, mock_ec2
E ImportError: cannot import name 'mock_iam' from 'moto' (/nix/store/0m4kbrm9ys7wz3ffmx7fwzl5mcsf6dba-python3.12-moto-5.0.3/lib/python3.12/site-packages/moto/__init__.py). Did you mean: 'mock_aws'?
=========================== short test summary info ============================
ERROR tests/test_aws.py
ERROR tests/test_prompt.py
ERROR tests/test_snapshot.py
!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 3 errors in 0.30s ===============================
To Reproduce Steps to reproduce the behavior:
- Run tests Expected behavior Tests to pass
Desktop (please complete the following information):
- OS: n/a
- App version: 0.1.10
Quick note here, I think moto removed the moto_
I'm using it like this in another project currently:
from moto import mock_aws