コード例 #1
0
 def test_meth_edit_wrng_id(self):
     res = NotesApplication('fortune')
     res.create('hey edit me')
     self.assertFalse(res.edit(0, 'hey edit me'), 'Please enter correct Note ID.')
コード例 #2
0
 def test_meth_edit_cor_id(self):
     res = NotesApplication('fortune')
     res.create('fortune talks less')
     res.edit(0, 'hey now edit me')
     self.assertEqual(res.note_name, ['hey now edit me'])
コード例 #3
0
 def test_meth_delete(self):
     res = NotesApplication('fortune')
     res.create('Hey now brown cow')
     self.assertFalse(res.delete(0))
コード例 #4
0
 def test_meth_delete_sec_note(self):
     res = NotesApplication('fortune')
     res.create('hot dogs')
     res.create('I\'ve got to eat some raw tomatoes')
     self.assertFalse(res.delete(1))
コード例 #5
0
 def test_meth_search(self):
     res = NotesApplication('fortune')
     res.create('fortune is my name')
     self.assertEqual(res.search('fortune'), None)
コード例 #6
0
 def test_meth_delete_if_nothing(self):
     res = NotesApplication('fortune')
     res.create('iyke is my name too')
     self.assertFalse(res.delete(0), [])
コード例 #7
0
 def test_meth_print_list(self):
     res = NotesApplication('fortune')
     res.create('fortune is my name')
     self.assertFalse(res.list())
コード例 #8
0
 def test_meth_get_note(self):
     res = NotesApplication('fortune')
     res.create('fortune is my name')
     self.assertEqual(res.get(0), 'fortune is my name')
コード例 #9
0
 def test_meth_create_note_index1(self):
     res = NotesApplication('fortune')
     res.create('fortune is my name')
     res.create('you can call me iyke')
     self.assertNotEqual(res.note_name[0], 'you can call me iyke')
コード例 #10
0
 def test_meth_create_note(self): 
     res = NotesApplication('fortune')
     res.create('fortune is my name but you can call me iyke')
     self.assertEqual(res.note_name,['fortune is my name but you can call me iyke'])
コード例 #11
0
 def test_meth_edit(self):
     res = NotesApplication('fortune')
     res.create('He\'s so good to me')
     res.create('I mean the Lord God Almighty')
     res.edit(1, 'yes and that\'s so true')
     self.assertNotEqual(res.note_name[0], 'yes and that\'s so true')
コード例 #12
0
 def test_meth_edit_id_0(self):
     res = NotesApplication('fortune')
     res.create('I\'ll make it through Andela')
     res.create('it has been written')
     res.edit(0, 'nothing go fit edit am')
     self.assertEqual(res.note_name[0], 'nothing go fit edit am')
コード例 #13
0
 def test_meth_edit_id_1(self):
     res = NotesApplication('fortune')
     res.create('fortune is my name')
     res.create('call me iyke too')
     res.edit(1, 'hey now brown cow')
     self.assertEqual(res.note_name[1], 'hey now brown cow')