コード例 #1
0
	def test_search_mixed_case(self):
		notes = NotesApplication()
		notes.create("Day one at Andela BC")
		notes.create("Day two at Andela BC")
		self.assertEqual(notes.search("tWo"), "Showing results for search 'tWo'\nNote ID: 2\nDay two at Andela BC\n\nBy Author Guest", msg="Supposed to be return same result for 'two'")
コード例 #2
0
	def test_search(self):
		notes = NotesApplication()
		notes.create("Day one at Andela BC")
		notes.create("Day two at Andela BC")
		self.assertEqual(notes.search("two"), "Showing results for search 'two'\nNote ID: 2\nDay two at Andela BC\n\nBy Author Guest", msg="")
コード例 #3
0
	def test_search_capitalised1(self):
		notes = NotesApplication()
		notes.create("Day one at Andela BC")
		notes.create("Day two at Andela BC")
		self.assertEqual(notes.search("ONE"), "Showing results for search 'ONE'\nNote ID: 1\nDay one at Andela BC\n\nBy Author Guest", msg="")
コード例 #4
0
	def test_search_empty_field(self):
		notes = NotesApplication()
		notes.create("Day one at Andela BC")
		notes.create("Day two at Andela BC")
		self.assertEqual(notes.search(), None, msg="Supposed to be an empty return")