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 1
1
from __future__ import absolute_import
2
2
from tests import testlib
3
3
4
+ import unittest
5
+ import os
6
+
4
7
try :
5
8
from utils import *
6
9
except ImportError :
@@ -76,6 +79,27 @@ def test_dslice_all_args(self):
76
79
}
77
80
self .assertTrue (expected == dslice (TEST_DICT , * test_args ))
78
81
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
+
79
103
80
104
if __name__ == "__main__" :
81
105
try :
You can’t perform that action at this time.
0 commit comments