# HG changeset patch # User RhodeCode Admin # Date 2023-07-18 14:01:38 # Node ID ff28a588dca2aa784ed9b53698630e08a1df8167 # Parent a001879508a674dbea64c19cc40314ae4f21cf6d tests: fixed some tests because of wrong compare strings diff --git a/rhodecode/tests/lib/middleware/test_simplehg.py b/rhodecode/tests/lib/middleware/test_simplehg.py --- a/rhodecode/tests/lib/middleware/test_simplehg.py +++ b/rhodecode/tests/lib/middleware/test_simplehg.py @@ -137,7 +137,7 @@ def test_get_config(user_util, baseapp, ('phases', 'publish', 'True'), ('extensions', 'largefiles', ''), ('paths', '/', hg_config_org.get('paths', '/')), - ('rhodecode', 'RC_SCM_DATA', '[["foo", "FOO", "bar", "BAR"]]') + ('rhodecode', 'RC_SCM_DATA', '[["foo","FOO","bar","BAR"]]') ] for entry in expected_config: assert entry in hg_config 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 @@ -153,7 +153,8 @@ class TestHooksHttpHandler(object): with date_patcher, caplog.at_level(logging.DEBUG): handler.log_message('Some message %d, %s', 123, 'string') - expected_message = f"HOOKS: {ip_port} - - [{fake_date}] Some message 123, string" + expected_message = f"HOOKS: client={ip_port} - - [{fake_date}] Some message 123, string" + assert_message_in_log( caplog.records, expected_message, levelno=logging.DEBUG, module='hooks_daemon') @@ -265,7 +266,7 @@ class TestHttpHooksCallbackDaemon(object assert_message_in_log( caplog.records, - 'Running event loop of callback daemon in background thread', + 'Running thread-based loop of callback daemon in background', levelno=logging.DEBUG, module='hooks_daemon') def test_stop_cleans_up_the_connection(self, tcp_server, caplog):