[apparmor] [patch] Add tests for aa.py get_output() and get_reqs()

Seth Arnold seth.arnold at canonical.com
Mon Feb 1 19:50:49 UTC 2016


On Mon, Feb 01, 2016 at 07:35:07PM +0100, Christian Boltz wrote:
> --- utils/test/test-aa.py       2016-01-26 22:22:14.660008000 +0100
> +++ utils/test/test-aa.py       2016-02-01 18:53:10.085684909 +0100
> @@ -14,8 +14,9 @@
>  from common_test import read_file, write_file
>  
>  import os
>  
> -from apparmor.aa import (check_for_apparmor, get_interpreter_and_abstraction, create_new_profile,
> +import apparmor.aa as aa  # needed to set global vars in some tests
> +from apparmor.aa import (check_for_apparmor, get_output, get_reqs, get_interpreter_and_abstraction, create_new_profile,

Most of this looked good but I'm a bit worried about the global variables.
Could they be referenced via apparmor.aa.<whatever> instead? I think
that'd lead to better comprehension two years from now..

Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160201/b9914c90/attachment.pgp>


More information about the AppArmor mailing list