diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-10-13 21:39:58 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-10-13 21:39:58 +0200 |
commit | 7e7adc64713f74976d5994af36b5f758620fb37b (patch) | |
tree | 868084317f8818dbb327c76eaff3c7c7edce0231 /tests/api/test_JSONBackend.py | |
parent | fixed JsEngine init (diff) | |
download | pyload-7e7adc64713f74976d5994af36b5f758620fb37b.tar.xz |
added JSON and WS client, re organized tests, new classes for easier api tests
Diffstat (limited to 'tests/api/test_JSONBackend.py')
-rw-r--r-- | tests/api/test_JSONBackend.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/api/test_JSONBackend.py b/tests/api/test_JSONBackend.py new file mode 100644 index 000000000..a3805497b --- /dev/null +++ b/tests/api/test_JSONBackend.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- + +from nose.tools import raises + +from module.remote.JSONClient import JSONClient + +class TestJSONBackend: + + def setUp(self): + self.client = JSONClient() + + def test_login(self): + self.client.login("User", "test") + self.client.getServerVersion() + self.client.logout() + + def test_wronglogin(self): + ret = self.client.login("WrongUser", "wrongpw") + assert ret == False + + @raises(Exception) + def test_access(self): + self.client.getServerVersion() + + @raises(Exception) + def test_unknown_method(self): + self.client.sdfdsg() |