Пример #1
0
 def test_lower(self):
     """ Check for short lower flag"""
     args_list = ['-l', 'hello']
     self.assertEqual(echo.main(args_list), 'hello')
Пример #2
0
 def no_args(self):
     args = ["Hello!"]
     result = echo.main(args)
     self.assertEquals(result, 'Hello!')
Пример #3
0
 def test_upper_long(self):
     """ Check for long upper flag"""
     args_list = ['--upper', 'hello']
     self.assertEqual(echo.main(args_list), 'HELLO')
Пример #4
0
 def test_two(self):
     args = ["-tl", "heLLo"]
     namespace = self.parser.parse_args(args)
     self.assertTrue(namespace.two)
     result = echo.main(args)
     self.assertEquals(result, "hello")
Пример #5
0
 def test_all_three(self):
     args = ["-tul", "heLLo"]
     namespace = self.parser.parse_args(args)
     self.assertTrue(namespace.all)
     result = echo.main(args)
     self.assertEquals(result, "HELLO")
Пример #6
0
 def test_title2(self):
     args = ["-title", "hello"]
     namespace = self.parser.parse_args(args)
     self.assertTrue(namespace.title)
     result = echo.main(args)
     self.assertEquals(result, "Hello")
Пример #7
0
 def test_lower2(self):
     args = ["-lower", "heLLo"]
     namespace = self.parser.parse_args(args)
     self.assertTrue(namespace.lower)
     result = echo.main(args)
     self.assertEquals(result, "hello")
Пример #8
0
 def test_upper2(self):
     args = ["-upper", "hello"]
     namespace = self.parser.parse_args(args)
     self.assertTrue(namespace.upper)
     result = echo.main(args)
     self.assertEquals(result, "HELLO")