diff --git a/moto/core/models.py b/moto/core/models.py index d22cda2bb..2482f4702 100644 --- a/moto/core/models.py +++ b/moto/core/models.py @@ -128,6 +128,8 @@ class BaseMockAWS: attr_value = getattr(klass, attr) if not hasattr(attr_value, "__call__"): continue + if not hasattr(attr_value, "__name__"): + continue # Check if this is a classmethod. If so, skip patching if inspect.ismethod(attr_value) and attr_value.__self__ is klass: diff --git a/requirements-tests.txt b/requirements-tests.txt index 350da8111..1efb50046 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,5 +1,5 @@ pytest pytest-cov -sure==1.4.11 +sure freezegun pylint