From 2427bf5cb636729819b31302960904038c6fb765 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 3 Nov 2015 22:40:19 +0100 Subject: [PATCH] bdd: Make expect_error handle warnings. --- tests/integration/features/conftest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration/features/conftest.py b/tests/integration/features/conftest.py index fe2d37e1b..818943cc7 100644 --- a/tests/integration/features/conftest.py +++ b/tests/integration/features/conftest.py @@ -72,12 +72,13 @@ def list_of_loaded_pages(httpbin, pages): assert httpbin.get_requests() == requests -@bdd.then(bdd.parsers.re(r'the (?Perror|message) "(?P.*)" ' - r'should be shown.')) +@bdd.then(bdd.parsers.re(r'the (?Perror|message|warning) ' + r'"(?P.*)" should be shown.')) def expect_error(quteproc, httpbin, category, message): category_to_loglevel = { 'message': logging.INFO, 'error': logging.ERROR, + 'warning': logging.WARNING, } message = message.replace('(port)', str(httpbin.port)) quteproc.mark_expected(category='message',