def hello(name): return 'hello %s' % name import unittest class Tests(unittest.TestCase): def test_hello(self): self.assertEqual(hello('sam'), 'hello sam') self.assertEqual(hello('bob'), 'hello bob')