This diff expands on the sensors testing section
sandyryza yuhan prha
- R1:0a56501ba729: [docs] Expand section on testing sensors
docs build, unit
seems like instance_for_test comes from nowhere. should we either include import instance_for_test inside the code snippet or switch to use another func to build an ephemeral instance?
Given that the sensor doesn't use the instance, it seems like unnecessary boilerplate to need to define an instance here. Are we able to not require that?
Good point. I think sensors/schedules require persistent instances, but maybe making an example that doesn't use the instance at all will let us get away with not using one.
Does this work on master? I believe that, with Phil's recent addition of sensor cursors,get_execution_data now returns a SensorExecutionData, which I don't believe is iterable.
yes, hence the requests.run_requests. A better variable name would probably help here, like execution_data.run_requests.