Added testAlbumUrl, testAlbumReleaseDate to test_album

This commit is contained in:
Andrea Grandi 2008-09-16 01:22:32 +00:00
parent 471e6e9abb
commit 62a338a75b
1 changed files with 9 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import unittest import unittest
import datetime
import api import api
import album import album
@ -17,5 +18,13 @@ class testAlbum(unittest.TestCase):
def testAlbumArtist(self): def testAlbumArtist(self):
self.assertEqual(self.album_test.artist.name, "Oasis") self.assertEqual(self.album_test.artist.name, "Oasis")
def testAlbumUrl(self):
url = 'http://www.last.fm/music/Oasis/Supersonic'
self.assertEqual(self.album_test.url, url)
def testAlbumReleaseDate(self):
date = datetime.datetime(1994, 7, 28, 0, 0)
self.assertEqual(self.album_test.releaseDate, date)
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()