From 08fd3f93b4e88dec8f1f72243e847e99192e502c Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Wed, 3 Jun 2020 22:56:18 +0000 Subject: Fix flake8 errors in tests --- tests/test_pandora/test_client.py | 1 - tests/test_pandora/test_transport.py | 1 - tests/test_pydora/test_utils.py | 18 +++++++++--------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/tests/test_pandora/test_client.py b/tests/test_pandora/test_client.py index 69eac65..8144f42 100644 --- a/tests/test_pandora/test_client.py +++ b/tests/test_pandora/test_client.py @@ -236,7 +236,6 @@ class TestAdditionalUrls(TestCase): stationToken='token_mock', xplatformAdCapable=True)]) - def test_with_enum(self): with patch.object(APIClient, '__call__') as playlist_mock: transport = Mock(side_effect=[errors.InvalidAuthToken(), None]) diff --git a/tests/test_pandora/test_transport.py b/tests/test_pandora/test_transport.py index 7eaaa6b..851fa06 100644 --- a/tests/test_pandora/test_transport.py +++ b/tests/test_pandora/test_transport.py @@ -1,4 +1,3 @@ -import sys import time import json import random diff --git a/tests/test_pydora/test_utils.py b/tests/test_pydora/test_utils.py index 475a7b5..fc33a40 100644 --- a/tests/test_pydora/test_utils.py +++ b/tests/test_pydora/test_utils.py @@ -40,12 +40,12 @@ class TestIterateForever(TestCase): side_effect=ParameterMissing("ParameterMissing")) with plmock as get_playlist_mock: - with self.assertRaises(ParameterMissing): - station = Station.from_json( - self.client, {'stationToken': 'token_mock'}) - track_mock = PlaylistItem.from_json( - self.client, {'token': 'token_mock'}) - get_playlist_mock.return_value = iter([track_mock]) - - station_iter = iterate_forever(station.get_playlist) - next(station_iter) + with self.assertRaises(ParameterMissing): + station = Station.from_json( + self.client, {'stationToken': 'token_mock'}) + track_mock = PlaylistItem.from_json( + self.client, {'token': 'token_mock'}) + get_playlist_mock.return_value = iter([track_mock]) + + station_iter = iterate_forever(station.get_playlist) + next(station_iter) -- cgit v1.2.3