summaryrefslogtreecommitdiffstats
path: root/tests/api/test_WebSocketBackend.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/api/test_WebSocketBackend.py')
-rw-r--r--tests/api/test_WebSocketBackend.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/api/test_WebSocketBackend.py b/tests/api/test_WebSocketBackend.py
index 679654fc9..a9288104f 100644
--- a/tests/api/test_WebSocketBackend.py
+++ b/tests/api/test_WebSocketBackend.py
@@ -5,23 +5,25 @@ from nose.tools import raises
from pyload.remote.apitypes import Forbidden
from pyload.remote.WSClient import WSClient
+from tests.helper.config import credentials, wsAddress
+
class TestWebSocketBackend:
def setUp(self):
- self.client = WSClient()
+ self.client = WSClient(wsAddress)
self.client.connect()
def tearDown(self):
self.client.close()
def test_login(self):
- self.client.login("User", "test")
+ self.client.login(*credentials)
self.client.getServerVersion()
self.client.logout()
def test_wronglogin(self):
ret = self.client.login("WrongUser", "wrongpw")
- assert ret == False
+ assert ret is False
@raises(Forbidden)
def test_access(self):
@@ -29,5 +31,5 @@ class TestWebSocketBackend:
@raises(AttributeError)
def test_unknown_method(self):
- self.client.login("User", "test")
+ self.client.login(*credentials)
self.client.sdfdsg()