# HG changeset patch # User Marcin Kuzminski # Date 2017-02-23 12:56:11 # Node ID 8e46a3113cbb0cdc0a0bf9d33b4ecaa2fdf24af7 # Parent cf13f14cb0ffc16ef9b2c514ea5558b4e1dfb981 tests: fixed tests for the added extra traceback with exceptions for vcsserver. diff --git a/rhodecode/tests/lib/test_hooks_daemon.py b/rhodecode/tests/lib/test_hooks_daemon.py --- a/rhodecode/tests/lib/test_hooks_daemon.py +++ b/rhodecode/tests/lib/test_hooks_daemon.py @@ -109,11 +109,13 @@ class TestHooksHttpHandler(object): with read_patcher, hooks_patcher: server = MockServer(hooks_daemon.HooksHttpHandler, request) - expected_result = json.dumps({ + org_exc = json.loads(server.request.output_stream.buflist[-1]) + expected_result = { 'exception': 'Exception', - 'exception_args': ('Test exception', ) - }) - assert server.request.output_stream.buflist[-1] == expected_result + 'exception_traceback': org_exc['exception_traceback'], + 'exception_args': ['Test exception'] + } + assert org_exc == expected_result def test_log_message_writes_to_debug_log(self, caplog): ip_port = ('0.0.0.0', 8888)