From 210789a5fe6a279fcdc9961536b6fbc6ac03fca3 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 13 Feb 2017 09:01:04 +0200 Subject: [PATCH 1/2] Update error message for test_init_with_token https://github.com/pylast/pylast/pull/198#issuecomment-279208373 --- tests/test_pylast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_pylast.py b/tests/test_pylast.py index a1b6fa5..59c71c1 100755 --- a/tests/test_pylast.py +++ b/tests/test_pylast.py @@ -2172,7 +2172,7 @@ class TestPyLast(unittest.TestCase): msg = str(exc) # Assert - self.assertEqual(msg, "Invalid authentication token supplied") + self.assertEqual(msg, "Unauthorized Token - This token has not been issued") @flaky(max_runs=5, min_passes=1) From a9549030f41d830e15b7e594a67fb799edf7fab9 Mon Sep 17 00:00:00 2001 From: hugovk Date: Mon, 13 Feb 2017 19:39:07 +0200 Subject: [PATCH 2/2] flake8 --- pylast/__init__.py | 1 + tests/test_pylast.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pylast/__init__.py b/pylast/__init__.py index 5f96c88..ed200cf 100644 --- a/pylast/__init__.py +++ b/pylast/__init__.py @@ -51,6 +51,7 @@ def _can_use_ssl_securely(): v = sys.version_info return v > (3, 3) or ((2, 7, 9) < v < (3, 0)) + if _can_use_ssl_securely(): import ssl diff --git a/tests/test_pylast.py b/tests/test_pylast.py index 59c71c1..fbac259 100755 --- a/tests/test_pylast.py +++ b/tests/test_pylast.py @@ -2172,7 +2172,8 @@ class TestPyLast(unittest.TestCase): msg = str(exc) # Assert - self.assertEqual(msg, "Unauthorized Token - This token has not been issued") + self.assertEqual(msg, + "Unauthorized Token - This token has not been issued") @flaky(max_runs=5, min_passes=1)