aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorjcass <john.cass77@gmail.com>2016-01-02 22:55:07 +0200
committerjcass <john.cass77@gmail.com>2016-01-02 22:55:07 +0200
commit9259bdab02ac2aa0dc46893f65214e1834f37d2d (patch)
tree4d4c02029fc6e61ad4643d6f571d83088533a7f8 /tests
parentbcbe294e8143f2a28b38e4d93e53f142bca5e3b0 (diff)
downloadpydora-9259bdab02ac2aa0dc46893f65214e1834f37d2d.tar.bz2
pydora-9259bdab02ac2aa0dc46893f65214e1834f37d2d.tar.xz
pydora-9259bdab02ac2aa0dc46893f65214e1834f37d2d.zip
Add ad_token to AdItem definition.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_pandora/test_client.py1
-rw-r--r--tests/test_pandora/test_models.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_pandora/test_client.py b/tests/test_pandora/test_client.py
index 58fca74..cf486e0 100644
--- a/tests/test_pandora/test_client.py
+++ b/tests/test_pandora/test_client.py
@@ -105,6 +105,7 @@ class TestGettingAds(TestCase):
105 105
106 ad_item = client.get_ad_item('id_mock', 'token_mock') 106 ad_item = client.get_ad_item('id_mock', 'token_mock')
107 assert ad_item.station_id == 'id_mock' 107 assert ad_item.station_id == 'id_mock'
108 assert ad_item.ad_token == 'token_mock'
108 109
109 ad_metadata_mock.assert_has_calls([call("ad.getAdMetadata", 110 ad_metadata_mock.assert_has_calls([call("ad.getAdMetadata",
110 adToken='token_mock', 111 adToken='token_mock',
diff --git a/tests/test_pandora/test_models.py b/tests/test_pandora/test_models.py
index 538cee5..495bb8e 100644
--- a/tests/test_pandora/test_models.py
+++ b/tests/test_pandora/test_models.py
@@ -225,6 +225,8 @@ class TestAdItem(TestCase):
225 api_client_mock = Mock(spec=APIClient) 225 api_client_mock = Mock(spec=APIClient)
226 api_client_mock.default_audio_quality = APIClient.HIGH_AUDIO_QUALITY 226 api_client_mock.default_audio_quality = APIClient.HIGH_AUDIO_QUALITY
227 self.result = AdItem.from_json(api_client_mock, self.JSON_DATA) 227 self.result = AdItem.from_json(api_client_mock, self.JSON_DATA)
228 self.result.station_id = 'station_id_mock'
229 self.result.ad_token = 'token_mock'
228 230
229 def test_is_ad_is_true(self): 231 def test_is_ad_is_true(self):
230 assert self.result.is_ad is True 232 assert self.result.is_ad is True