def test_sense(self): ''' Test to gather lm-sensors data from a given chip ''' with patch.dict(sensors.__salt__, {'cmd.run': MagicMock(return_value='A:a B:b C:c D:d')}): self.assertDictEqual(sensors.sense('chip'), {'A': 'a B'})
def test_sense(): """ Test to gather lm-sensors data from a given chip """ with patch.dict(sensors.__salt__, {"cmd.run": MagicMock(return_value="A:a B:b C:c D:d")}): assert sensors.sense("chip") == {"A": "a B"}