def test_NotesApplication_edit2(self): """Tests if the delete method \ returns False \ when the list is empty.\ """ edit2 = NotesApplication('John') self.assertEqual(False, edit2.edit(3, "Great"), msg="Sorry list is empty")
def test_NotesApplication_edit(self): """Tests if the edit method \ returns True \ when a note is successfully edited.\ """ edit = NotesApplication('John') edit.create("Nigeria") self.assertEqual( "Noted edited successfully!", edit.edit(0, "Wonderful!"))
def test_edit_invalid_index1(self): author_notes = NotesApplication('New Author', ["Test Content1", "Test Content2", "Test Content3"]) author_notes.edit(-3, "Test Content4") notes_result = author_notes.list() self.assertTrue(notes_result, msg='Delete should return True for a negative Invalid Index')