|  | @@ -0,0 +1,27 @@
 | 
	
		
			
			|  | 1 | +# -*- coding: utf-8 -*-
 | 
	
		
			
			|  | 2 | +import os
 | 
	
		
			
			|  | 3 | +import subprocess
 | 
	
		
			
			|  | 4 | +
 | 
	
		
			
			|  | 5 | +from nose.tools import ok_
 | 
	
		
			
			|  | 6 | +
 | 
	
		
			
			|  | 7 | +import tracim
 | 
	
		
			
			|  | 8 | +
 | 
	
		
			
			|  | 9 | +
 | 
	
		
			
			|  | 10 | +class TestCommands(object):
 | 
	
		
			
			|  | 11 | +    def test_commands(self):
 | 
	
		
			
			|  | 12 | +        """
 | 
	
		
			
			|  | 13 | +        Test listing of gearbox command: Tracim commands must be listed
 | 
	
		
			
			|  | 14 | +        :return:
 | 
	
		
			
			|  | 15 | +        """
 | 
	
		
			
			|  | 16 | +        os.chdir(os.path.dirname(tracim.__file__) + '/../')
 | 
	
		
			
			|  | 17 | +
 | 
	
		
			
			|  | 18 | +        output = subprocess.check_output(["gearbox", "-h"])
 | 
	
		
			
			|  | 19 | +        output = output.decode('utf-8')
 | 
	
		
			
			|  | 20 | +
 | 
	
		
			
			|  | 21 | +        ok_(output.find('not a command') == -1)
 | 
	
		
			
			|  | 22 | +
 | 
	
		
			
			|  | 23 | +        ok_(output.find('serve') > 0)
 | 
	
		
			
			|  | 24 | +
 | 
	
		
			
			|  | 25 | +        ok_(output.find('ldap server') > 0)
 | 
	
		
			
			|  | 26 | +        ok_(output.find('user create') > 0)
 | 
	
		
			
			|  | 27 | +        ok_(output.find('user update') > 0)
 |