tests/test_nuxeo.py::test_unauthorized FAILED [100%]
============================================================ FAILURES =============================================================
________________________________________________________ test_unauthorized ________________________________________________________
server = <nuxeo.client.Nuxeo object at 0x7f24490cf3d0>
def test_unauthorized(server):
username = 'alice'
password = 'test'
auth = server.client.auth
server.client.auth = (get_bytes(username), password)
try:
with pytest.raises(Unauthorized) as e:
server.users.create(
User(properties={
'username': 'another_one',
'password': 'test'
}))
print(e)
> print(e.value)
auth = ('Administrator', 'Administrator')
e = <ExceptionInfo Unauthorized tblen=4>
password = 'test'
server = <nuxeo.client.Nuxeo object at 0x7f24490cf3d0>
username = 'alice'
tests/test_nuxeo.py:294:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nuxeo/exceptions.py:69: in __str__
return repr(self)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <[UnicodeDecodeError("'ascii' codec can't decode byte 0xe2 in position 60: ordinal not in range(128)") raised in repr()] SafeRepr object at 0x7f24490af248>
def __repr__(self):
return '%s(%d), error: %s, server trace: %s' % (
> type(self).__name__, self.status, self.message, self.stacktrace)
E UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 60: ordinal not in range(128)
self = <[UnicodeDecodeError("'ascii' codec can't decode byte 0xe2 in position 60: ordinal not in range(128)") raised in repr()] SafeRepr object at 0x7f2448ffaef0>
nuxeo/exceptions.py:65: UnicodeDecodeError
------------------------------------------------------ Captured stdout call -------------------------------------------------------
nuxeo/client.py:209: Unauthorized: <unprintable Unauthorized object>