Completely unsure and can't find much information on how to unit test a response from a boto 3 lambda client, especially seen as i need to decode the response that comes back as it is stored in an object. Here is an example of something like the function i would like to unit test
def get_attachment(my_id):
payload = {"myId": my_id}
response = lambda_client.invoke(
FunctionName=os.environ["MY_LAMBDA"],
Payload=json.dumps(payload),
)
response_content = json.loads(response["Payload"].read().decode())
return response_content["claim"][0]