def test_search_artwork_case_insensitive_name_match(self): self.add_test_data() self.assertCountEqual([self.aw1, self.aw2], artworkstore.search_artwork('aRtWork'))
def test_search_artwork_empty_store(self): self.clear_artworkstore() self.assertEqual([], artworkstore.search_artwork('No artwork here'))
def test_search_artwork_name_match(self): self.add_test_data() self.assertCountEqual([self.aw1, self.aw2], artworkstore.search_artwork('Artwork'))
def test_search_artwork_not_found(self): self.add_test_data() self.assertCountEqual([], artworkstore.search_artwork('Not in list'))
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)