I need to unit test a ComponentResource, it creates some resources but are not exposed, there's some way to get them from the test?
h
hallowed-teacher-48474
10/22/2021, 3:45 PM
Hey Fabio, the way we managed it is that we created a new class that inherits ComponentResource (Python) and expose these resources as class properties, so we can access them from the outside
f
freezing-van-87649
10/22/2021, 6:17 PM
One option we’ve been experimenting with is capturing them in the mock.
We’ve got a mock option that captures all the resource/api call invocations and added some helper methods to find resources created with a given type.