Ejemplo n.º 1
0
    def test_remove_empty_player(self):

        app = App()
        response = app.remove_player(None)

        self.assertFalse(response.ok)
        self.assertEqual('The player name can\'t be empty.', response.message)
Ejemplo n.º 2
0
    def test_remove_nonexistent_player(self):

        app = App()
        reponse = app.remove_player('Rafael')

        self.assertFalse(reponse.ok)
        self.assertEqual('Rafael not in the list', reponse.message)
Ejemplo n.º 3
0
    def test_remove_player_successfully(self):

        app = App()
        reponse = app.add_player('Rafael')
        response = app.remove_player('Rafael')

        self.assertTrue(reponse.ok)
        self.assertEqual('Rafael was succesfully removed.', response.message)