Example #1
0
 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'})
Example #2
0
 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'})
Example #3
0
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"}