Does anyone know how to mock the `Awaitable*whatev...
# python
Does anyone know how to mock the
's that happen, in python unit tests?
Copy code
class MyMocks(pulumi.runtime.Mocks):
    def new_resource(self, args: pulumi.runtime.MockResourceArgs):
        outputs = args.inputs
        # if args.typ == "aws:route53/getZone:getZone":
        #     outputs = {
        #         **args.inputs,
        #         "zone_id": "TEST",
        #     }
        return [ + "_id", outputs]

    def call(self, args: pulumi.runtime.MockCallArgs):
        if args.token == "aws:iam/getPolicyDocument:getPolicyDocument":
            return {"json": json.dumps({})}
        if args.token == "aws:route53/getZone:getZone":
            return {"zone_id": "TEST"}
        return {}
I've even defined this as part of the mocks...
The documentation provides like, one example how to do this with the get_ami ... but I'm using get_zone... and I don't know if there's nuance, or if the fact that that get_zone is using a different provider causes a problem?
need to be
OK it does look like that did it. I guess when examining the mocking sample I overlooked the fact that these properties were mixedCase and not snake_case.