sparse-intern-71089
05/20/2019, 5:34 PMwhite-balloon-205
some_output
is available (either after a resource is created or updated) the Pulumi engine will cause that future to be resolved with the value of the resource returned by the cloud provider.worried-engineer-33884
05/20/2019, 5:37 PMwhite-balloon-205
worried-engineer-33884
05/20/2019, 5:55 PMworried-engineer-33884
05/20/2019, 5:56 PMworried-engineer-33884
05/20/2019, 6:08 PMdef test_bucket_name_is_my_bucket():
from infrastructure import bucket_name
assert bucket_name() == "my-bucket"
@pytest.mark.asyncio
async def test_bucket_urn_is_my_bucket():
from infrastructure import bucket
bucket_urn = await get_output(bucket.urn)
assert bucket_urn.endswith("aws:s3/bucket:Bucket::my-bucket")
def get_output(output):
future = asyncio.Future()
output.apply(lambda value: future.set_result(value))
return future
worried-engineer-33884
05/20/2019, 6:09 PM