aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2018-09-01 04:17:23 +0000
committerMike Crute <mike@crute.us>2018-09-01 04:19:42 +0000
commit3de319435697e65a3b5d8570adc3ddaf88ee857f (patch)
tree9ddef98ea7b18fb725b8ee5568eb5730ed7183a8
parentf6d1613deb7ec23d38b3d7d2c20b065f3457c8b8 (diff)
downloadpydora-3de319435697e65a3b5d8570adc3ddaf88ee857f.tar.bz2
pydora-3de319435697e65a3b5d8570adc3ddaf88ee857f.tar.xz
pydora-3de319435697e65a3b5d8570adc3ddaf88ee857f.zip
Add missing tests for PandoraType
-rw-r--r--tests/test_pandora/test_models.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_pandora/test_models.py b/tests/test_pandora/test_models.py
index 808efa4..ce71ef8 100644
--- a/tests/test_pandora/test_models.py
+++ b/tests/test_pandora/test_models.py
@@ -642,3 +642,18 @@ class TestBookmark(TestCase):
642 def test_delete_artist_bookmark(self): 642 def test_delete_artist_bookmark(self):
643 pm.Bookmark.from_json(self.client, self.ARTIST_BOOKMARK).delete() 643 pm.Bookmark.from_json(self.client, self.ARTIST_BOOKMARK).delete()
644 self.client.delete_artist_bookmark.assert_called_with("token") 644 self.client.delete_artist_bookmark.assert_called_with("token")
645
646
647class TestPandoraType(TestCase):
648
649 def test_it_can_be_built_from_a_model(self):
650 pt = pm.PandoraType.from_model(None, "TR")
651 self.assertIs(pm.PandoraType.TRACK, pt)
652
653 def test_it_can_be_built_from_string(self):
654 pt = pm.PandoraType.from_string("TR")
655 self.assertIs(pm.PandoraType.TRACK, pt)
656
657 def test_it_returns_genre_for_unknown_string(self):
658 pt = pm.PandoraType.from_string("FOO")
659 self.assertIs(pm.PandoraType.GENRE, pt)