2014-03-07 09:58:54 -08:00
|
|
|
#! /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
|
2014-09-03 18:26:19 -07:00
|
|
|
from common_test import AAParseTest, setup_regex_tests
|
2014-03-07 09:58:54 -08:00
|
|
|
|
2014-09-03 18:26:19 -07:00
|
|
|
class AAParseDBUSTest(AAParseTest):
|
2014-03-07 09:58:54 -08:00
|
|
|
|
2014-09-03 18:26:19 -07:00
|
|
|
def setUp(self):
|
|
|
|
self.parse_function = aa.parse_dbus_rule
|
2014-03-07 09:58:54 -08:00
|
|
|
|
2014-09-03 18:26:19 -07:00
|
|
|
tests = [
|
|
|
|
('dbus,', 'dbus base keyword'),
|
|
|
|
('dbus send,', 'dbus simple send rule'),
|
|
|
|
]
|
2014-03-07 09:58:54 -08:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2014-09-03 18:26:19 -07:00
|
|
|
setup_regex_tests(AAParseDBUSTest)
|
2014-07-25 17:49:06 -07:00
|
|
|
unittest.main(verbosity=2)
|