aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Crute <mcrute@gmail.com>2016-01-09 14:04:47 -0800
committerMike Crute <mcrute@gmail.com>2016-01-09 14:04:47 -0800
commit3261aecab486d25909ffdd8ae70630c6838c2768 (patch)
treea2b7da7c9dca41d7d5e5fefe8091214300f9adbe /tests
parent4603c5ab3818abd2ea8550bf4cade7dd33ad5f98 (diff)
downloadpydora-3261aecab486d25909ffdd8ae70630c6838c2768.tar.bz2
pydora-3261aecab486d25909ffdd8ae70630c6838c2768.tar.xz
pydora-3261aecab486d25909ffdd8ae70630c6838c2768.zip
Throw InvalidUserLogin error when login fails
fixes https://github.com/mcrute/pydora/issues/41
Diffstat (limited to 'tests')
-rw-r--r--tests/test_pandora/test_client.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_pandora/test_client.py b/tests/test_pandora/test_client.py
index f7f0574..ce91e21 100644
--- a/tests/test_pandora/test_client.py
+++ b/tests/test_pandora/test_client.py
@@ -42,6 +42,12 @@ class TestAPIClientLogin(TestCase):
42 self.assertIs(self.StubTransport.FAKE_USER, transport.user) 42 self.assertIs(self.StubTransport.FAKE_USER, transport.user)
43 self.assertIs(self.StubTransport.FAKE_PARTNER, transport.partner) 43 self.assertIs(self.StubTransport.FAKE_PARTNER, transport.partner)
44 44
45 def test_login_user_error(self):
46 with self.assertRaises(errors.InvalidUserLogin):
47 transport = Mock(side_effect=[None, errors.InvalidPartnerLogin])
48 client = BaseAPIClient(transport, None, None, None)
49 client.login("foobear", "secret")
50
45 51
46class TestCallingAPIClient(TestCase): 52class TestCallingAPIClient(TestCase):
47 53