Exemplo n.º 1
0
 def test_devices(self):
     '''
     Test if it get known BTRFS formatted devices on the system.
     '''
     mock = MagicMock(return_value={'retcode': 1,
                                    'stderr': '',
                                    'stdout': 'Salt'})
     with patch.dict(btrfs.__salt__, {'cmd.run_all': mock}):
         self.assertEqual(btrfs.devices(), 'Salt')
Exemplo n.º 2
0
 def test_devices(self):
     '''
     Test if it get known BTRFS formatted devices on the system.
     '''
     mock = MagicMock(return_value={'retcode': 1,
                                    'stderr': '',
                                    'stdout': 'Salt'})
     with patch.dict(btrfs.__salt__, {'cmd.run_all': mock}):
         self.assertEqual(btrfs.devices(), 'Salt')
Exemplo n.º 3
0
 def test_devices(self):
     """
     Test if it get known BTRFS formatted devices on the system.
     """
     with patch("salt.utils.fsutils._blkid_output", MagicMock(return_value="Salt")):
         mock = MagicMock(
             return_value={"retcode": 1, "stderr": "", "stdout": "Salt"}
         )
         with patch.dict(btrfs.__salt__, {"cmd.run_all": mock}):
             self.assertEqual(btrfs.devices(), "Salt")