#!/usr/bin/env python3
import json
import requests

HOST = "localhost"
PORT = "9000"

LAMBDA_URL = f"http://{HOST}:{PORT}/2015-03-31/functions/function/invocations"

payload = {
    "Records": [
        {
            "messageId": "test-message-id",
            "body": json.dumps(
                # {
                #     "address": "2 Laburnum Way, Rombley, BR2 8BZ | Retrofit Assessment",
                #     "hubspot_deal_id": "500262906061",
                # }
                {"address": "33 Wallaby Way, Sydney", "hubspot_deal_id": "123456789"}
            ),
        }
    ]
}

response = requests.post(LAMBDA_URL, json=payload)

print("Status code:", response.status_code)
print("Response:")
print(response.text)
