def test_app_delete_Missing(self):
     notes = NotesApplication('John')
     notes.create("I want to write more, But I cannot Find the word")
     result = notes.delete(90)
     self.assertFalse(result)
 def test_app_delete_two(self):
     notes = NotesApplication('Mide')
     notes.create("Alot happened so far")
     notes.create("And alot still to happen")
     notes.delete(0)
     self.assertEqual("And alot still to happen", notes.note_list[0])
 def test_app_delete(self):
     notes = NotesApplication('John')
     notes.create("I want to write more, But I cannot Find the word")
     notes.delete(0)
     self.assertEqual([], notes.note_list)
 def test_app_get_list_empty(self):
     expected_result = "No note created yet"
     notes = NotesApplication('Mide')
     self.assertEqual(expected_result, notes.list())
 def test_app_create_fail(self):
     notes = NotesApplication("Malik")
     result = notes.create("")
     self.assertFalse(result)
 def test_app_create(self):
     notes = NotesApplication("Malik")
     note_id = notes.create("The first note created with the application for testing")
     self.assertEqual("The first note created with the application for testing", notes.note_list[note_id])
Ejemplo n.º 7
0
def getList():
	obj = NotesApplication("Mark Twain")
	for i in range(1,5):
		obj.create("Content {0}".format(i))
	return obj.alist()