def test_erase_word_the_last_occurance_of_the_word_should_be_repalced_by_spaces( self): w = Write() w.write_on_paper( desired_text_to_write= "How much wood would a woodchuck chuck if a woodchuck could chuck wood?" ) w.erase('chuck') self.assertEqual( w.paper, "How much wood would a woodchuck chuck if a woodchuck could wood?" )
def test_edit_replacec_apple_with_a_longer_word(self): w = Write() w.write_on_paper( desired_text_to_write="An apple a day keeps the doctor away") index = w.erase('apple') w.edit(index, 'artichoke') self.assertEqual(w.paper, "An artich@k@ay keeps the doctor away")
def test_edit_replacec_apple_with_onion(self): w = Write() w.write_on_paper( desired_text_to_write="An apple a day keeps the doctor away") index = w.erase('apple') w.edit(index, 'onion') self.assertEqual(w.paper, "An onion a day keeps the doctor away")