You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pynamodb.exceptions.PutError: Failed to put item: An error occurred (UnrecognizedClientException) on request (KSN7UV9EQ61HRSN4G52AHA5EBVVV4KQNSO5AEMVJF66Q9ASUAAJG) on table (Logs) when calling the PutItem operation: The security token included in the request is invalid.
My problem is that I have a big test suite and I don't want to have @mock_dynamodb above each test suite but rather once in my base class, but it isn't working.
The text was updated successfully, but these errors were encountered:
Hi @Seluj78. This bug happens because the class-decorator only acts on the class as it is compiled. But in this scenario, we only know at runtime that we should be mocking the test_logs-method.
This is essentially the same problem as #4967, even if it's exposed differently. I'm going to close this as a duplicate - please follow that issue for updates.
moto version: 4.2.9
With this example
You can see that the error raised is
If we change the code to
then it is working
My problem is that I have a big test suite and I don't want to have
@mock_dynamodb
above each test suite but rather once in my base class, but it isn't working.The text was updated successfully, but these errors were encountered: