Пример #1
0
 def test_dirinfo(self):
     '''
     Test if it return information on a directory located on the Moose
     '''
     mock = MagicMock(return_value={'stdout': 'Salt:salt'})
     with patch.dict(moosefs.__salt__, {'cmd.run_all': mock}):
         self.assertDictEqual(moosefs.dirinfo('/tmp/salt'), {'Salt': 'salt'})
Пример #2
0
 def test_dirinfo(self):
     '''
     Test if it return information on a directory located on the Moose
     '''
     mock = MagicMock(return_value={'stdout': 'Salt:salt'})
     with patch.dict(moosefs.__salt__, {'cmd.run_all': mock}):
         self.assertDictEqual(moosefs.dirinfo('/tmp/salt'), {'Salt': 'salt'})
Пример #3
0
def test_dirinfo():
    """
    Test if it return information on a directory located on the Moose
    """
    mock = MagicMock(return_value={"stdout": "Salt:salt"})
    with patch.dict(moosefs.__salt__, {"cmd.run_all": mock}):
        assert moosefs.dirinfo("/tmp/salt") == {"Salt": "salt"}