aio-libs / aiobotocore

asyncio support for botocore library using aiohttp

Home Page:https://aiobotocore.rtfd.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question about unit testing a Lambda function

jrobbins-LiveData opened this issue · comments

I recently switched a Python Lambda function from synchronous to asyncio. Some of my unit tests (using moto) broke, raising AttributeError: 'AWSResponse' object has no attribute 'raw_headers'

I searched issues in aiobotocore and found #755 (comment), which included this statement

So we basically don't support the moto wrapper based tests...

The comment refers to a PR, but in reviewing the lengthy thread, I didn't feel confident I knew which PR was meant. Basically, I'm looking for recommendations on how to unit test my Lambda function, specifically needing to mock the cognito-idp service. Is there an asyncio pytest package recommended? Are there any tutorials or howtos?