On Mon, 03/05 10:16, Paolo Bonzini wrote:
> These patches add template tags and filters designed for use in email sent
> by Patchew: convert ANSI to text, and grep with context.
>
> Not very much tested. :)
Looks good but seems tests are broken:
https://travis-ci.org/patchew-project/patchew-ci/jobs/349199479
(venv) fam@lemon:~/work/patchew [master]$ ./manage.py test tests
Loaded module: footer
Loaded module: email
Loaded module: git
Loaded module: tags
Loaded module: diff
Loaded module: testing
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
..................................................................Cannot invoke module hook: <testing.TestingModule object at 0x7fdde20f8b38>.rest_results_hook
Traceback (most recent call last):
File "/stor/work/patchew/mod.py", line 205, in dispatch_module_hook
getattr(i, hook_name)(**params)
File "/stor/work/patchew/mods/testing.py", line 273, in rest_results_hook
log_url = self.reverse_testing_log(message, tn, request=request, html=False)
NameError: name 'request' is not defined
ECannot invoke module hook: <testing.TestingModule object at 0x7fdde20f8b38>.rest_results_hook
Traceback (most recent call last):
File "/stor/work/patchew/mod.py", line 205, in dispatch_module_hook
getattr(i, hook_name)(**params)
File "/stor/work/patchew/mods/testing.py", line 273, in rest_results_hook
log_url = self.reverse_testing_log(message, tn, request=request, html=False)
NameError: name 'request' is not defined
E.............................
======================================================================
ERROR: test_rest_done_failure (test_testing.TestingTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/stor/work/patchew/tests/test_testing.py", line 82, in test_rest_done_failure
self.assertEquals(resp.data['results']['testing.tests']['status'], 'failure')
KeyError: 'testing.tests'
======================================================================
ERROR: test_rest_done_success (test_testing.TestingTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/stor/work/patchew/tests/test_testing.py", line 74, in test_rest_done_success
self.assertEquals(resp.data['results']['testing.tests']['status'], 'success')
KeyError: 'testing.tests'
----------------------------------------------------------------------
Ran 97 tests in 48.061s
FAILED (errors=2)
Destroying test database for alias 'default'...