def test_version(self): """ Test for Return version from hadoop version """ mock = MagicMock(return_value="A \nB \n") with patch.dict(hadoop.__salt__, {"cmd.run": mock}): self.assertEqual(hadoop.version(), "B")
def test_version(self): ''' Test for Return version from hadoop version ''' mock = MagicMock(return_value="A \nB \n") with patch.dict(hadoop.__salt__, {'cmd.run': mock}): self.assertEqual(hadoop.version(), 'B')
def test_version(self): ''' Test for Return version from hadoop version ''' mock = MagicMock(return_value="A \nB \n") with patch.dict(hadoop.__salt__, {'cmd.run': mock}): self.assertEqual(hadoop.version(), 'B')