Hi all, we are trying to find the best way to writ...
# python
b
Hi all, we are trying to find the best way to write our unit tests and we started making use of the
Output.apply(assert_callback)
method as suggested, but we were wondering if there could be some issues in doing something like this:
Copy code
@pulumi.runtime.test
async def test_cluster(self, component_parameters):
   cluster = AuroraCluster(**component_parameters)
   assert isinstance(cluster.cluster, aws.rds.Cluster)
   assert await cluster.cluster.cluster_identifier.future() == f"{component_parameters['name']}-cluster"
It has been working great until now, considering we are using it only inside our tests. It's making it a lot easier to write and read them. So the question is: do you think we may face some issues following this path? Is there some strange hidden behaviour or side-effect that we are not triggering using
future()
with
async/await
instead of the
apply()
?