|
@@ 1454-1475 (lines=22) @@
|
| 1451 |
|
self.assertEqual( |
| 1452 |
|
"http://www.last.fm/music/test%2bartist/test%2balbum", url) |
| 1453 |
|
|
| 1454 |
|
@handle_lastfm_exceptions |
| 1455 |
|
def test_track_data(self): |
| 1456 |
|
# Arrange |
| 1457 |
|
thing = self.network.get_track("Test Artist", "Test Title") |
| 1458 |
|
|
| 1459 |
|
# Act |
| 1460 |
|
stringed = str(thing) |
| 1461 |
|
repr = thing.__repr__() |
| 1462 |
|
title = thing.get_title() |
| 1463 |
|
name = thing.get_name() |
| 1464 |
|
playcount = thing.get_playcount() |
| 1465 |
|
url = thing.get_url(pylast.DOMAIN_FRENCH) |
| 1466 |
|
|
| 1467 |
|
# Assert |
| 1468 |
|
self.assertEqual(stringed, "Test Artist - Test Title") |
| 1469 |
|
self.assertIn("pylast.Track('Test Artist', 'Test Title',", repr) |
| 1470 |
|
self.assertEqual(title, "Test Title") |
| 1471 |
|
self.assertEqual(title, name) |
| 1472 |
|
self.assertIsInstance(playcount, int) |
| 1473 |
|
self.assertGreater(playcount, 1) |
| 1474 |
|
self.assertEqual( |
| 1475 |
|
"http://www.lastfm.fr/music/test%2bartist/_/test%2btitle", url) |
| 1476 |
|
|
| 1477 |
|
@handle_lastfm_exceptions |
| 1478 |
|
def test_tag_top_artists(self): |
|
@@ 1432-1452 (lines=21) @@
|
| 1429 |
|
# Assert |
| 1430 |
|
self.helper_two_things_in_list(shouts, pylast.Shout) |
| 1431 |
|
|
| 1432 |
|
@handle_lastfm_exceptions |
| 1433 |
|
def test_album_data(self): |
| 1434 |
|
# Arrange |
| 1435 |
|
thing = self.network.get_album("Test Artist", "Test Album") |
| 1436 |
|
|
| 1437 |
|
# Act |
| 1438 |
|
stringed = str(thing) |
| 1439 |
|
repr = thing.__repr__() |
| 1440 |
|
title = thing.get_title() |
| 1441 |
|
name = thing.get_name() |
| 1442 |
|
playcount = thing.get_playcount() |
| 1443 |
|
url = thing.get_url() |
| 1444 |
|
|
| 1445 |
|
# Assert |
| 1446 |
|
self.assertEqual(stringed, "Test Artist - Test Album") |
| 1447 |
|
self.assertIn("pylast.Album('Test Artist', 'Test Album',", repr) |
| 1448 |
|
self.assertEqual(title, name) |
| 1449 |
|
self.assertIsInstance(playcount, int) |
| 1450 |
|
self.assertGreater(playcount, 1) |
| 1451 |
|
self.assertEqual( |
| 1452 |
|
"http://www.last.fm/music/test%2bartist/test%2balbum", url) |
| 1453 |
|
|
| 1454 |
|
@handle_lastfm_exceptions |
| 1455 |
|
def test_track_data(self): |