From 83e86706ffcbf42f5bd8431e628f6a8c6ec4fc8d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 27 Feb 2016 02:14:34 +0100 Subject: [PATCH] tests: Make check for ddg being loaded less strict Before this change, adding a new logging message involving logging e.g. the default duckduckgo setting value failed. Now we basically use a black- instead of a whitelist and only fail if we get a load status message for duckduckgo. --- tests/integration/quteprocess.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/integration/quteprocess.py b/tests/integration/quteprocess.py index 5b9fb3281..191730e98 100644 --- a/tests/integration/quteprocess.py +++ b/tests/integration/quteprocess.py @@ -264,12 +264,12 @@ class QuteProc(testprocess.Process): testutils.pattern_match(pattern='[*] [FAIL] *', value=msg.message)) # Try to complain about the most common mistake when accidentally - # loading external resources. A fuzzy_url line gets logged when - # initializing settings though, so ignore those. - is_ddg_page = ( - 'duckduckgo' in msg.message and not (msg.module == 'urlutils' and - msg.function == 'fuzzy_url')) - return msg.loglevel > logging.INFO or is_js_error or is_ddg_page + # loading external resources. + is_ddg_load = testutils.pattern_match( + pattern="load status for : *", + value=msg.message) + return msg.loglevel > logging.INFO or is_js_error or is_ddg_load def _maybe_skip(self): """Skip the test if [SKIP] lines were logged."""