mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-01 06:45:38 +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:
@@ -10,7 +10,8 @@
|
|||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
|
||||||
import unittest
|
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):
|
class TestFoo(AATest):
|
||||||
tests = [
|
tests = [
|
||||||
@@ -46,8 +47,8 @@ class TestBaz(AATest):
|
|||||||
def test_Baz_only_one_test(self):
|
def test_Baz_only_one_test(self):
|
||||||
self.assertEqual("baz", "baz")
|
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__)
|
setup_all_loops(__name__)
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main(verbosity=1)
|
unittest.main(verbosity=1)
|
||||||
|
Reference in New Issue
Block a user