예제 #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")
예제 #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')
예제 #3
0
파일: hadoop_test.py 프로젝트: DaveQB/salt
 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')