def test_check_word(self, fake):
        fake.return_value = 'Weapon'
        hangman = Hangman()
        hangman.generate_word()
        hangman.check_word('Bear')

        assert not hangman.is_finalized()

        hangman.check_word('  WeaPOn  ')
        assert hangman.is_finalized()
    def test_is_finalized(self, fake):
        fake.return_value = 'Hello'
        hangman = Hangman()
        hangman.generate_word()
        hangman.check_letter('H')
        hangman.check_letter('E')
        hangman.check_letter('L')
        hangman.check_letter('o')

        # test if is finalized
        assert hangman.is_finalized()

        fake.return_value = 'Bye'
        hangman.generate_word()
        hangman.check_letter('a')
        hangman.check_letter('b')
        hangman.check_letter('c')

        # test if is not finalized
        assert not hangman.is_finalized()