Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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")
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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")