Add the --nombr bootloader option in pykickstart
[pykickstart.git] / tests / commands / logging.py
blob1fe6a046cd4a076dea201eebb305ba30d97142b7
1 # Andy Lindeberg <alindebe@redhat.com>
3 # Copyright 2009 Red Hat, Inc.
5 # This copyrighted material is made available to anyone wishing to use, modify,
6 # copy, or redistribute it subject to the terms and conditions of the GNU
7 # General Public License v.2. This program is distributed in the hope that it
8 # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
9 # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 # See the GNU General Public License for more details.
12 # You should have received a copy of the GNU General Public License along with
13 # this program; if not, write to the Free Software Foundation, Inc., 51
14 # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
15 # trademarks that are incorporated in the source code or documentation are not
16 # subject to the GNU General Public License and may only be used or replicated
17 # with the express permission of Red Hat, Inc.
20 import unittest
21 from tests.baseclass import *
23 from pykickstart.errors import *
24 from pykickstart.commands.logging import *
26 class FC6_TestCase(CommandTest):
27 command = "logging"
29 def runTest(self):
30 # pass
31 self.assert_parse("logging", "logging --level=info\n")
32 self.assert_parse("logging --level=debug", "logging --level=debug\n")
33 self.assert_parse("logging --level=info", "logging --level=info\n")
34 self.assert_parse("logging --level=warning", "logging --level=warning\n")
35 self.assert_parse("logging --level=error", "logging --level=error\n")
36 self.assert_parse("logging --level=critical", "logging --level=critical\n")
37 self.assert_parse("logging --host=HOSTNAME", "logging --level=info --host=HOSTNAME\n")
38 self.assert_parse("logging --host=HOSTNAME --port=PORT", "logging --level=info --host=HOSTNAME --port=PORT\n")
40 # fail
41 self.assert_parse_error("logging --level=theprincessisinanothercastle", KickstartParseError)
42 self.assert_parse_error("logging --host", KickstartParseError)
43 self.assert_parse_error("logging --port", KickstartParseError)
44 self.assert_parse_error("logging --port=PORT", KickstartParseError)
47 if __name__ == "__main__":
48 unittest.main()