예제 #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)
예제 #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)
예제 #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)