diff options
author | Mike Crute <mcrute@gmail.com> | 2016-01-09 14:04:47 -0800 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2016-01-09 14:04:47 -0800 |
commit | 3261aecab486d25909ffdd8ae70630c6838c2768 (patch) | |
tree | a2b7da7c9dca41d7d5e5fefe8091214300f9adbe /tests | |
parent | 4603c5ab3818abd2ea8550bf4cade7dd33ad5f98 (diff) | |
download | pydora-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.py | 6 |
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 | ||
46 | class TestCallingAPIClient(TestCase): | 52 | class TestCallingAPIClient(TestCase): |
47 | 53 | ||