#NEWLINE# @ patch ( 'salt.modules.djangomod._get_django_admin' , MagicMock ( return_value = True ) ) #NEWLINE# def test_command( self ) : #NEWLINE# #INDENT# '\n        Test if it runs arbitrary django management command\n        ' #NEWLINE# mock = MagicMock ( return_value = True ) #NEWLINE# with patch . dict ( djangomod . __salt__ , { #NEWLINE# #INDENT# 'cmd.run' : self , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# self . assertTrue ( djangomod . command ( 'DJANGO_SETTINGS_MODULE' , 'validate' ) )