I need to unit test a ComponentResource, it create...
# python
l
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
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
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.
h
@freezing-van-87649 Nicee, this could be useful! 🤓
👍 1
l
TY @freezing-van-87649
👍 1