From 304804addb4e06865cea4418f1e754421895768c Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Mon, 10 Oct 2016 23:09:41 +0200 Subject: [PATCH] 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 --- utils/test/aa_test.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/utils/test/aa_test.py b/utils/test/aa_test.py index 0bf973a55..a8d004a37 100755 --- a/utils/test/aa_test.py +++ b/utils/test/aa_test.py @@ -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():