Beispiel #1
0
 def test_greet(self):
     """
     greet()have to return How are you
     """
     self.assertEqual(cool_game.greet('Jack', False),
                      'Hello Jack! How are you?')
Beispiel #2
0
 def test_greet_enemy_boolean(self):
     with self.assertRaises(ValueError):
         cool_game.greet('Ivan', 'Bla-bla')
Beispiel #3
0
 def test_greet_enemy(self):
     self.assertEqual(cool_game.greet('Ivan', True),
                      'Hello Ivan! I will kill you, bastard')
Beispiel #4
0
 def test_greet(self):
     self.assertEqual(cool_game.greet('Jack', False), 'Hello Jack! How are you?')
Beispiel #5
0
 def test_greet_enemy_boolean(self):
     """greet() have to return 'I will kill you!' If isEnemy == True"""
     with self.assertRaises(ValueError):
         cool_game.greet('Ivan', 'Bla')
Beispiel #6
0
 def test_greet_enemy(self):
     """greet() have to return 'I will kill you!' If isEnemy == True"""
     self.assertEqual(cool_game.greet('Ivan', True),
                      'Hello Ivan! I will kill you!')