示例#1
0
 def test_list_all_notes_empty(self):
     note = NotesApplication("author", ["note1", "note2", "note3", "note4", "note5"])
     list_all = note.list()
     self.assertListEqual(note.list, [], 
     	                 msg = "Success: The list returns empty if no note created ")
示例#2
0
	def test_edit_invalid_index(self):
		notes = NotesApplication("author", ["note1", "note2", "note3", "note4"])
		note.edit(6, "note4")
		result = notes.list()
		self.assertTrue(result, True, msg = 'Delete should return True for Invalid Index')
示例#3
0
 def test_list_all_notes_1(self):
     note = NotesApplication("author", ["note1", "note2", "note3", "note4", "note5"])
     list_all = note.list()
     self.assertListEqual(note.list, ["note1", "note2", "note3", "note4", "note5"],
                          msg = "Success: All notes in the list should be listed if there are 5 notes")
示例#4
0
	def test_edit_valid_index(self):
		note = NotesApplication("author", ["note1", "note2", "note3", "note4"])
		note.edit(1, "note9")
		note_list = note.list()
		self.assertListEqual(note_list, ["note1", "note2", "note3", "note4"], msg='Edit should alter supplied index in the notes list')