test latest commits (146)
*$ make test*
tests/test_auth.py::TestAuth::test_register FAILED
tests/test_auth.py::TestAuth::test_register_invalid FAILED
tests/test_cache.py::CacheTest::test_change_detection PASSED
tests/test_cache.py::CacheTest::test_different_keys PASSED
tests/test_cache.py::CacheTest::test_logic PASSED
tests/test_cache.py::CacheTest::test_memoize_and_expiration PASSED
tests/test_cache.py::CacheTest::test_timing PASSED
tests/test_json.py::TestJson::test_objectify PASSED
tests/test_session.py::TestSession::test_session PASSED
tests/test_session.py::TestSession::test_session_in_db PASSED
tests/test_session.py::TestSession::test_session_in_memcache can't run as
root without the -u switch
PASSED
tests/test_tags.py::TestTags::test_tags PASSED
tests/test_url.py::TestURL::test_url PASSED
========================================== FAILURES
===========================================
___________________________________ TestAuth.test_register
____________________________________
self = <tests.test_auth.TestAuth testMethod=test_register>
def test_register(self):
body = {
'email': '[email protected]',
'password': '123456789',
'first_name': 'Pinco',
'last_name': 'Pallino'
}
self.assertEqual(
> self.auth.action('api/register', 'POST', {}, body),
{
'id': 1,
'status': 'success',
'code': 200}
)
tests/test_auth.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
web3py/utils/auth.py:139: in action
data = self.register(vars, send=True).as_dict()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
self = <web3py.utils.auth.Auth object at 0x7f9209964160>
fields = {'email': '[email protected]', 'first_name': 'Pinco', '
last_name': 'Pallino','password': '123456789'}
send = True
def register(self, fields, send=True):
> fields['username'] = fields['username'].lower()
E KeyError: 'username'
web3py/utils/auth.py:204: KeyError
_______________________________ TestAuth.test_register_invalid
________________________________
self = <tests.test_auth.TestAuth testMethod=test_register_invalid>
def test_register_invalid(self):
body = {'email': '[email protected]'}
self.assertEqual(
> self.auth.action('api/register', 'POST', {}, body),
{
'id': None,
'errors': {
'password': 'Too short',
'first_name': 'Enter a value',
'last_name': 'Enter a value'
},
'status': 'error',
'message': 'validation errors',
'code': 401
}
)
tests/test_auth.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
web3py/utils/auth.py:139: in action
data = self.register(vars, send=True).as_dict()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
self = <web3py.utils.auth.Auth object at 0x7f9208ed03c8>
fields = {'email': '[email protected]'}, send = True
def register(self, fields, send=True):
> fields['username'] = fields['username'].lower()
E KeyError: 'username'
web3py/utils/auth.py:204: KeyError
====================================== warnings summary
=======================================
web3py/core.py:626
/root/web3py/web3py/core.py:626: DeprecationWarning: invalid escape
sequence \d
@bottle.route('/%s/static/_<version:re:\d+\.\d+\.\d+>/<filename:path>'
% app_name)
-- Docs: https://docs.pytest.org/en/latest/warnings.html
======================= 2 failed, 12 passed, 1 warnings in 5.41 seconds
=======================
Makefile:13: recipe for target 'test' failed
make: *** [test] Error 1
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/ca38e0af-4e61-4b8c-9a00-8b4049430662%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.