| 1 | # Authors: Karl MacMillan <[email protected]> |
| 2 | # |
| 3 | # Copyright (C) 2006 Red Hat |
| 4 | # see file 'COPYING' for use and warranty information |
| 5 | # |
| 6 | # This program is free software; you can redistribute it and/or |
| 7 | # modify it under the terms of the GNU General Public License as |
| 8 | # published by the Free Software Foundation; version 2 only |
| 9 | # |
| 10 | # This program is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | # GNU General Public License for more details. |
| 14 | # |
| 15 | # You should have received a copy of the GNU General Public License |
| 16 | # along with this program; if not, write to the Free Software |
| 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 18 | # |
| 19 | |
| 20 | import unittest |
| 21 | import sepolgen.module as module |
| 22 | import os |
| 23 | |
| 24 | class TestModuleCompiler(unittest.TestCase): |
| 25 | def test(self): |
| 26 | package = "module_compile_test.pp" |
| 27 | mc = module.ModuleCompiler() |
| 28 | mc.create_module_package("module_compile_test.te", refpolicy=True) |
| 29 | os.stat(package) |
| 30 | os.unlink(package) |
| 31 | |
| 32 | mc.refpolicy = True |
| 33 | mc.create_module_package("module_compile_test.te", refpolicy=False) |
| 34 | os.stat(package) |
| 35 | os.unlink(package) |