Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure #26

Open
fabaff opened this issue Apr 6, 2024 · 1 comment
Open

Test failure #26

fabaff opened this issue Apr 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@fabaff
Copy link

fabaff commented Apr 6, 2024

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:

  1. Run tests
    Expected behavior
    Tests to pass

Desktop (please complete the following information):

  • OS: n/a
  • App version: 0.1.10
@fabaff fabaff added the bug Something isn't working label Apr 6, 2024
fabaff added a commit to fabaff/nixpkgs that referenced this issue Apr 12, 2024
RhinoSecurityLabs/dsnap#26
ImportError: cannot import name 'mock_iam' from 'moto'
@RyanJarv
Copy link
Contributor

Quick note here, I think moto removed the moto_ modules.

I'm using it like this in another project currently:

from moto import mock_aws

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants