def test_create_a_new_instance_of_Search(self): searcher = ArtistSearcher([]) self.assertIsInstance(searcher, ArtistSearcher)
def setUp(self): self.searcher = ArtistSearcher(fake_data)
def test_should_fail_if_data_provided_is_not_type_list(self): with self.assertRaises(TypeError) as cm: searcher = ArtistSearcher('some string') exception = cm.exception self.assertEquals(exception.message, 'data should be of type list')