Ejemplo n.º 1
0
def test_get():
    """
    Tests the return of get function
    """
    mock_cmd = MagicMock(return_value="foo")
    with patch.dict(mac_sysctl.__salt__, {"cmd.run": mock_cmd}):
        assert mac_sysctl.get("kern.ostype") == "foo"
Ejemplo n.º 2
0
 def test_get(self):
     '''
     Tests the return of get function
     '''
     mock_cmd = MagicMock(return_value='foo')
     with patch.dict(mac_sysctl.__salt__, {'cmd.run': mock_cmd}):
         self.assertEqual(mac_sysctl.get('kern.ostype'), 'foo')
Ejemplo n.º 3
0
 def test_get(self):
     '''
     Tests the return of get function
     '''
     mock_cmd = MagicMock(return_value='foo')
     with patch.dict(mac_sysctl.__salt__, {'cmd.run': mock_cmd}):
         self.assertEqual(mac_sysctl.get('kern.ostype'), 'foo')