File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 11from __future__ import absolute_import
22from tests import testlib
33
4+ import unittest
5+ import os
6+
47try :
58 from utils import *
69except ImportError :
@@ -76,6 +79,27 @@ def test_dslice_all_args(self):
7679 }
7780 self .assertTrue (expected == dslice (TEST_DICT , * test_args ))
7881
82+ class FilePermissionTest (unittest .TestCase ):
83+
84+ def setUp (self ):
85+ super (FilePermissionTest , self ).setUp ()
86+
87+ def test_filePermissions (self ):
88+
89+ def checkFilePermissions (dir_path ):
90+ for file in os .listdir (dir_path ):
91+ if file .__contains__ ('pycache' ):
92+ continue
93+ path = os .path .join (dir_path , file )
94+ if os .path .isfile (path ):
95+ permission = oct (os .stat (path ).st_mode )
96+ self .assertEqual (permission , '0o100644' )
97+ else :
98+ checkFilePermissions (path )
99+
100+ dir_path = os .path .join ('..' , 'splunklib' )
101+ checkFilePermissions (dir_path )
102+
79103
80104if __name__ == "__main__" :
81105 try :
You can’t perform that action at this time.
0 commit comments