mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			390 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			390 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import unittest
 | |
| import mock
 | |
| from cs import CsHelper
 | |
| import merge
 | |
| 
 | |
| 
 | |
| class TestCsHelper(unittest.TestCase):
 | |
| 
 | |
|     def setUp(self):
 | |
|         merge.DataBag.DPATH = "."
 | |
| 
 | |
|     @mock.patch('cs.CsHelper.subprocess')
 | |
|     def test_execute(self, mock_subprocess):
 | |
|         result = CsHelper.execute("/bin/false")
 | |
|         self.assertTrue(result is not None)
 | |
| 
 | |
| if __name__ == '__main__':
 | |
|     unittest.main()
 |