#NEWLINE# @ patch . object ( Collector , 'publish' ) #NEWLINE# def test_empty_sensor( self , publish_mock ) : #NEWLINE# #INDENT# feature = FeatureMock ( 'Core 0' ) #NEWLINE# chip = ChipMock ( 'coretemp-isa-0000' , [ feature ] ) #NEWLINE# patch_detected_chips_iter = patch ( 'sensors.iter_detected_chips' , return_value = [ chip ] ) #NEWLINE# patch_detected_chips_iter . start ( ) #NEWLINE# self . collector . collect ( ) #NEWLINE# patch_detected_chips_iter . stop ( ) #NEWLINE# self . assertUnpublished ( publish_mock , 'coretemp-isa-0000.Core-0' , None )