Esempio n. 1
0
 def test_search_artwork_case_insensitive_name_match(self):
     self.add_test_data()
     self.assertCountEqual([self.aw1, self.aw2],
                           artworkstore.search_artwork('aRtWork'))
Esempio n. 2
0
 def test_search_artwork_empty_store(self):
     self.clear_artworkstore()
     self.assertEqual([], artworkstore.search_artwork('No artwork here'))
Esempio n. 3
0
 def test_search_artwork_name_match(self):
     self.add_test_data()
     self.assertCountEqual([self.aw1, self.aw2],
                           artworkstore.search_artwork('Artwork'))
Esempio n. 4
0
 def test_search_artwork_not_found(self):
     self.add_test_data()
     self.assertCountEqual([], artworkstore.search_artwork('Not in list'))
Esempio n. 5
0
def search_artwork():
    search_term = ui.ask_question('Enter search term, will match partial name or email')
    matches = artworkstore.search_artwork(search_term)
    ui.show_artworks(matches)