Validate network interface name when parsing the kickstart (#1081982)
[pykickstart.git] / tests / commands / lang.py
blob937b73453fec4ffacd0e8876af214baa1d460581
1 import unittest
2 from tests.baseclass import *
4 from pykickstart.errors import *
5 from pykickstart.commands.authconfig import *
7 class FC3_TestCase(CommandTest):
8 command = "lang"
10 def runTest(self):
11 # pass
12 self.assert_parse("lang en_US", "lang en_US\n")
14 # fail
15 # Fail if less than or more than one argument is specified
16 self.assert_parse_error("lang", KickstartValueError)
17 self.assert_parse_error("lang en_US en_CA", KickstartValueError)
19 class F19_TestCase(FC3_TestCase):
20 command = "lang"
22 def runTest(self):
24 # pass
25 self.assert_parse("lang en_US")
26 self.assert_parse("lang en_US --addsupport=cs_CZ",
27 "lang en_US --addsupport=cs_CZ\n")
28 self.assert_parse("lang en_US --addsupport=sr_RS.UTF-8@latin",
29 "lang en_US --addsupport=sr_RS.UTF-8@latin\n")
30 self.assert_parse("lang en_US --addsupport=cs_CZ,fr_FR",
31 "lang en_US --addsupport=cs_CZ,fr_FR\n")
33 # fail
34 # Fail if less than or more than one argument is specified
35 self.assert_parse_error("lang", KickstartValueError)
36 self.assert_parse_error("lang en_US en_CA", KickstartValueError)
37 self.assert_parse_error("lang --addsupport=en_US", KickstartValueError)
39 if __name__ == "__main__":
40 unittest.main()