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

add an example for setup_aa() to test-example.py

(commented out, but having it documented is helpful nevertheless)
This commit is contained in:
Christian Boltz
2019-02-10 23:24:29 +01:00
parent f2c0a11327
commit d6bc00b35b

View File

@@ -10,7 +10,8 @@
# ------------------------------------------------------------------
import unittest
from common_test import AATest, setup_all_loops
from common_test import AATest, setup_all_loops # , setup_aa
# import apparmor.aa as aa # see the setup_aa() call for details
class TestFoo(AATest):
tests = [
@@ -46,8 +47,8 @@ class TestBaz(AATest):
def test_Baz_only_one_test(self):
self.assertEqual("baz", "baz")
# if you import apparmor.aa and call init_aa() in your tests, uncomment this
# setup_aa(aa)
setup_all_loops(__name__)
if __name__ == '__main__':
unittest.main(verbosity=1)