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 cases written in moto using Latest version of boto3 fails #3300

Closed
mickog opened this issue Sep 9, 2020 · 3 comments
Closed

Test cases written in moto using Latest version of boto3 fails #3300

mickog opened this issue Sep 9, 2020 · 3 comments
Labels
debugging Working with user to figure out if there is an issue

Comments

@mickog
Copy link

mickog commented Sep 9, 2020

Seeing this issue is not resolved #1793
I am using
boto = 2.49.0
boto3 = 1.14.57

with moto 1.3.16 I receive the following error

botocore.exceptions.ClientError: An error occurred (InvalidClientTokenId) when calling the Publish operation: No account found for the given parameters

../../.local/share/virtualenvs/grs-wcclaims-note-ingestion-service-enGYxXYk/lib/python3.8/site-packages/botocore/client.py:656: ClientError

with moto 1.3.10 there is no issues

    @mock_sns
    def test_publish_sns_message_success(self):
        sns_client_mockd = get_sns_client()
        sns_client_mockd.create_topic(Name=get_sns_topic_name())
        response = sns_client_mockd.list_topics()
        topic_arn = response["Topics"][0]["TopicArn"]

        os.environ["TOPIC_ARN"] = topic_arn

        edm_response = get_edm_response()
        output = publish_message_to_topic(edm_response)
def publish_message_to_topic(edm_response):
    message_to_publish = json.loads(edm_response)

    response = client.publish(
        TargetArn=os.environ["TOPIC_ARN"],
        Message=json.dumps({"default": message_to_publish["data"]}),
        MessageStructure="json",
    )
@bblommers bblommers added the debugging Working with user to figure out if there is an issue label Sep 9, 2020
@samsonych
Copy link

I confirm that the @mock_dynamodb2 decorator doesn't work with moto v1.3.16 (boto-2.49.0, boto3-1.14.60, botocore-1.12.253).

@bblommers
Copy link
Collaborator

Hi @samsonych, are you getting the same error message?
This might fix your issue:
https://github.com/spulec/moto/blob/master/README.md#very-important----recommended-usage

@bblommers
Copy link
Collaborator

Going to close this now, as it should be fixed by following the above guidelines.

Let me know if you run into any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugging Working with user to figure out if there is an issue
Projects
None yet
Development

No branches or pull requests

3 participants