Exemple #1
0
 def test10(self):
     # Check if Tame Impala has a website available
     artist_id = 1
     artist_detail = views.ArtistDetail()
     retrieved_artist = artist_detail.get_artist(artist_id)
     self.assert_("www." and ".co" in retrieved_artist.website)
Exemple #2
0
 def test9(self):
     # Check if Tame Impala has correct genre
     artist_id = 1
     artist_detail = views.ArtistDetail()
     retrieved_artist = artist_detail.get_artist(artist_id)
     self.assert_("psych" in retrieved_artist.genre)
Exemple #3
0
 def test8(self):
     # Check if artist with ID = 1 is Tame Impala
     artist_id = 1
     artist_detail = views.ArtistDetail()
     retrieved_artist = artist_detail.get_artist(artist_id)
     self.assertEqual(retrieved_artist.name, "Tame Impala")
Exemple #4
0
 def test7(self):
     # Check if 2 Chainz has a website available
     artist_id = 123
     artist_detail = views.ArtistDetail()
     retrieved_artist = artist_detail.get_artist(artist_id)
     self.assert_("www." and ".co" in retrieved_artist.website)
Exemple #5
0
 def test6(self):
     # Check if 2 Chainz has correct genre
     artist_id = 123
     artist_detail = views.ArtistDetail()
     retrieved_artist = artist_detail.get_artist(artist_id)
     self.assert_("hip hop" in retrieved_artist.genre)
Exemple #6
0
 def test5(self):
     # Check if artist with ID = 123 is 2 Chainz
     artist_id = 123
     artist_detail = views.ArtistDetail()
     retrieved_artist = artist_detail.get_artist(artist_id)
     self.assertEqual(retrieved_artist.name, "2 Chainz")