def test_lower(self): """ Check for short lower flag""" args_list = ['-l', 'hello'] self.assertEqual(echo.main(args_list), 'hello')
def no_args(self): args = ["Hello!"] result = echo.main(args) self.assertEquals(result, 'Hello!')
def test_upper_long(self): """ Check for long upper flag""" args_list = ['--upper', 'hello'] self.assertEqual(echo.main(args_list), 'HELLO')
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")
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")
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")
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")
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")