Add new RHEL7 logvol objects to master
[pykickstart.git] / tests / commands / services.py
blob15bf31d20e95fad333a33f8292f548e9c9a1f0a1
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 *
25 class FC6_TestCase(CommandTest):
26 command = "services"
28 def runTest(self):
29 # pass
30 self.assert_parse("services --enabled=WHEEITSASTRING", "services --enabled=\"WHEEITSASTRING\"\n")
31 self.assert_parse("services --disabled=WHEEANOTHERSTRING", "services --disabled=\"WHEEANOTHERSTRING\"\n")
32 self.assert_parse("services --enabled=thing1,thing2,thing3", "services --enabled=\"thing1,thing2,thing3\"\n")
33 self.assert_parse("services --enabled=\"thing1, thing2, thing3\"", "services --enabled=\"thing1,thing2,thing3\"\n")
34 self.assert_parse("services --disabled=thing1,thing2", "services --disabled=\"thing1,thing2\"\n")
35 self.assert_parse("services --disabled=\"thing1, thing2\"", "services --disabled=\"thing1,thing2\"\n")
37 # fail
38 self.assert_parse_error("services", KickstartParseError)
39 self.assert_parse_error("services --enabled", KickstartParseError)
40 self.assert_parse_error("services --disabled", KickstartParseError)
43 if __name__ == "__main__":
44 unittest.main()