2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 06:16:03 +00:00

ProfileStorage: merge parse_profile_start() into parse()

... which avoids handing several values around.

Also adjust the tests so that only the end result (of parse() gets
tested.
This commit is contained in:
Christian Boltz
2021-05-16 17:44:06 +02:00
parent 1642fea228
commit 42fe65de71
2 changed files with 7 additions and 28 deletions

View File

@@ -152,10 +152,6 @@ class AaTest_parse_profile_start(AATest):
]
def _run_test(self, params, expected):
parsed = ProfileStorage.parse_profile_start(params[0], 'somefile', 1, params[1], params[2])
self.assertEqual(parsed, expected)
(profile, hat, prof_storage) = ProfileStorage.parse(params[0], 'somefile', 1, params[1], params[2])
self.assertEqual(profile, expected[0])
@@ -177,9 +173,6 @@ class AaTest_parse_profile_start_errors(AATest):
]
def _run_test(self, params, expected):
with self.assertRaises(expected):
ProfileStorage.parse_profile_start(params[0], 'somefile', 1, params[1], params[2])
with self.assertRaises(expected):
ProfileStorage.parse(params[0], 'somefile', 1, params[1], params[2])