예제 #1
0
def test_get_output_volume():
    """
    Test if it get the output volume (range 0 to 100)
    """
    mock = MagicMock(return_value={"retcode": 0, "stdout": "25"})
    with patch.dict(mac_desktop.__salt__, {"cmd.run_all": mock}):
        assert mac_desktop.get_output_volume() == "25"
예제 #2
0
 def test_get_output_volume(self):
     '''
     Test if it get the output volume (range 0 to 100)
     '''
     mock = MagicMock(return_value={'retcode': 0, 'stdout': '25'})
     with patch.dict(mac_desktop.__salt__, {'cmd.run_all': mock}):
         self.assertEqual(mac_desktop.get_output_volume(), '25')
예제 #3
0
 def test_get_output_volume(self):
     '''
     Test if it get the output volume (range 0 to 100)
     '''
     mock = MagicMock(return_value={'retcode': 0, 'stdout': '25'})
     with patch.dict(mac_desktop.__salt__, {'cmd.run_all': mock}):
         self.assertEqual(mac_desktop.get_output_volume(), '25')
예제 #4
0
 def test_get_output_volume(self):
     '''
     Test if it get the output volume (range 0 to 100)
     '''
     mock = MagicMock(return_value=True)
     with patch.dict(mac_desktop.__salt__, {'cmd.run': mock}):
         self.assertTrue(mac_desktop.get_output_volume())