Rewrote test_user_password() for xmlrpclib.ProtocolError:
it would be very difficult to return string from BMXMLRPCRequestHandler
This commit is contained in:
parent
06033ed96e
commit
fabbccbeac
|
@ -53,11 +53,8 @@ class TestAPI(TestAPIProto):
|
||||||
def test_user_password(self):
|
def test_user_password(self):
|
||||||
"""Trying to connect with wrong username/password"""
|
"""Trying to connect with wrong username/password"""
|
||||||
api_wrong = xmlrpclib.ServerProxy("http://test:wrong@127.0.0.1:8442/")
|
api_wrong = xmlrpclib.ServerProxy("http://test:wrong@127.0.0.1:8442/")
|
||||||
self.assertEqual(
|
with self.assertRaises(xmlrpclib.ProtocolError):
|
||||||
api_wrong.clientStatus(),
|
api_wrong.clientStatus()
|
||||||
'RPC Username or password incorrect or HTTP header lacks'
|
|
||||||
' authentication at all.'
|
|
||||||
)
|
|
||||||
|
|
||||||
def test_connection(self):
|
def test_connection(self):
|
||||||
"""API command 'helloWorld'"""
|
"""API command 'helloWorld'"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user