mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00

Convert the DBUS parse tests to use common AAParseTest super class in common_test.py. Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: Christian Boltz <apparmor@cboltz.de>
28 lines
812 B
Python
28 lines
812 B
Python
#! /usr/bin/env python
|
|
# ------------------------------------------------------------------
|
|
#
|
|
# Copyright (C) 2014 Canonical Ltd.
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
# License published by the Free Software Foundation.
|
|
#
|
|
# ------------------------------------------------------------------
|
|
|
|
import apparmor.aa as aa
|
|
import unittest
|
|
from common_test import AAParseTest, setup_regex_tests
|
|
|
|
class AAParseDBUSTest(AAParseTest):
|
|
|
|
def setUp(self):
|
|
self.parse_function = aa.parse_dbus_rule
|
|
|
|
tests = [
|
|
('dbus,', 'dbus base keyword'),
|
|
('dbus send,', 'dbus simple send rule'),
|
|
]
|
|
|
|
if __name__ == '__main__':
|
|
setup_regex_tests(AAParseDBUSTest)
|
|
unittest.main(verbosity=2)
|