def test_version(self): """ Test if it return BTRFS version. """ mock = MagicMock(return_value={"retcode": 1, "stderr": "", "stdout": "Salt"}) with patch.dict(btrfs.__salt__, {"cmd.run_all": mock}): self.assertDictEqual(btrfs.version(), {"version": "Salt"})
def test_version(self): ''' Test if it return BTRFS version. ''' mock = MagicMock(return_value={'retcode': 1, 'stderr': '', 'stdout': 'Salt'}) with patch.dict(btrfs.__salt__, {'cmd.run_all': mock}): self.assertDictEqual(btrfs.version(), {'version': 'Salt'})