mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
Drop loadincludes() and mode_to_str() tests from aa_test.py
aa_test.py doesn't run in 'make check' because its filename doesn't match the 'test-*.py' pattern. mode_to_str() was dropped as part of the FileRule series, so it's pointless to keep its tests. (The replacement is totally different and has full test coverage already.) loadincludes() still exists, but only testing if the function runs without errors is not really helpful, so drop this test. Also drop unused imports and add an explicit import for apparmor.aamode. Acked-by: Steve Beattie <steve@nxnw.org>
This commit is contained in:
parent
93d1539f4f
commit
304804addb
1 changed files with 1 additions and 12 deletions
|
@ -13,8 +13,7 @@
|
|||
# ----------------------------------------------------------------------
|
||||
import unittest
|
||||
|
||||
import apparmor.aa
|
||||
import apparmor.logparser
|
||||
import apparmor.aamode
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
|
@ -35,16 +34,6 @@ class Test(unittest.TestCase):
|
|||
'C': apparmor.aamode.AA_EXEC_CHILD,
|
||||
}
|
||||
|
||||
def test_loadinclude(self):
|
||||
apparmor.aa.loadincludes()
|
||||
|
||||
|
||||
def test_modes_to_string(self):
|
||||
|
||||
for string in self.MODE_TEST.keys():
|
||||
mode = self.MODE_TEST[string]
|
||||
self.assertEqual(apparmor.aamode.mode_to_str(mode), string, 'mode is %s and string is %s'%(mode, string))
|
||||
|
||||
def test_string_to_modes(self):
|
||||
|
||||
for string in self.MODE_TEST.keys():
|
||||
|
|
Loading…
Add table
Reference in a new issue