aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Crute <mcrute@gmail.com>2015-12-06 19:33:46 -0800
committerMike Crute <mcrute@gmail.com>2015-12-06 19:33:46 -0800
commitc8114a08e846f7da550a3ffe5870dd199e79d6f2 (patch)
treefb080ff670fba90117319b16629158a8a5f6c388 /tests
parentc4ddc5ce038950a169d56307c098c928c9d3cace (diff)
downloadpydora-c8114a08e846f7da550a3ffe5870dd199e79d6f2.tar.bz2
pydora-c8114a08e846f7da550a3ffe5870dd199e79d6f2.tar.xz
pydora-c8114a08e846f7da550a3ffe5870dd199e79d6f2.zip
Move quality query to API
Diffstat (limited to 'tests')
-rw-r--r--tests/test_pandora/test_client.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_pandora/test_client.py b/tests/test_pandora/test_client.py
index 62b8440..71435a4 100644
--- a/tests/test_pandora/test_client.py
+++ b/tests/test_pandora/test_client.py
@@ -70,3 +70,24 @@ class TestCallingAPIClient(TestCase):
70 includeTrackLength=True, 70 includeTrackLength=True,
71 stationToken='mock_token', 71 stationToken='mock_token',
72 xplatformAdCapable=True)]) 72 xplatformAdCapable=True)])
73
74
75class TestGettingQualities(TestCase):
76
77 def test_with_invalid_quality_returning_all(self):
78 result = BaseAPIClient.get_qualities("foo", True)
79 self.assertEqual(BaseAPIClient.ALL_QUALITIES, result)
80
81 def test_with_invalid_quality_returning_none(self):
82 result = BaseAPIClient.get_qualities("foo", False)
83 self.assertEqual([], result)
84
85 def test_with_valid_quality(self):
86 result = BaseAPIClient.get_qualities(
87 BaseAPIClient.MED_AUDIO_QUALITY, False)
88
89 expected = [
90 BaseAPIClient.LOW_AUDIO_QUALITY,
91 BaseAPIClient.MED_AUDIO_QUALITY]
92
93 self.assertEqual(expected, result)