def test_properties(self): ''' Test if list properties for given btrfs object ''' mock = MagicMock(return_value={'retcode': 1, 'stderr': '', 'stdout': 'Salt'}) with patch.dict(btrfs.__salt__, {'cmd.run_all': mock}): self.assertDictEqual(btrfs.properties('/dev/sda1', 'subvol'), {})
def test_properties(self): """ Test if list properties for given btrfs object """ with patch("salt.utils.fsutils._verify_run", MagicMock(return_value=True)): mock = MagicMock( return_value={"retcode": 1, "stderr": "", "stdout": "Salt"} ) with patch.dict(btrfs.__salt__, {"cmd.run_all": mock}): self.assertDictEqual(btrfs.properties("/dev/sda1", "subvol"), {})