Hi community, what's the proper way to mock and un...
# flyte-support
m
Hi community, what's the proper way to mock and unit test a file sensor?
a
cc @damp-lion-88352 / @glamorous-carpet-83516
if there is a network call in sensor.poke(), you can mock it as well.
gratitude thank you 1
m
Thanks. I wanted to mock
FileSensor
so I managed to
@patch
it and then mocked its return value as
mock_file_sensor.poke = True
as of now its working as expected
Thanks for quick reply though 🦜
🙌🏽 1