Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/cklein/github/cklein/cpython/Lib/unittest/mock.py", line 657, in __getattr__
raise AttributeError(
AttributeError: 'assert_something' is not a valid assertion. Use a spec for the mock if 'assert_something' is meant to be an attribute.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/mock.py", line 635, in __getattr__
raise AttributeError("Attributes cannot start with 'assert' "
AttributeError: Attributes cannot start with 'assert' or 'assret'
The error message suggests that accessing attributes with prefix "assert_" should work when using a spec.