Esempio n. 1
0
 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")
Esempio n. 2
0
 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')
Esempio n. 3
0
 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')