From 81f03b2fb27a92bab143eb58622fa2bdd6e6b63a Mon Sep 17 00:00:00 2001 From: Mirochill <200482516+Mirochill@users.noreply.github.com> Date: Mon, 25 May 2026 20:00:12 +0200 Subject: [PATCH] Fix invalid HTTP collector test escape Use a raw string for the expected HTTP authentication warning regex so the literal period escape no longer triggers SyntaxWarning under recent Python versions. --- intelmq/tests/bots/collectors/http/test_collector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intelmq/tests/bots/collectors/http/test_collector.py b/intelmq/tests/bots/collectors/http/test_collector.py index a4dba63ac..1f1fb9a66 100644 --- a/intelmq/tests/bots/collectors/http/test_collector.py +++ b/intelmq/tests/bots/collectors/http/test_collector.py @@ -250,7 +250,7 @@ def check_authorization_header(request): captured = mocker.register_uri('GET', self.sysconfig['http_url'], text='Foo Bar', additional_matcher=check_authorization_header) - log_line = "Either 'http_username' or 'http_password' are given, but for HTTP Authentication, both must be set\." + log_line = r"Either 'http_username' or 'http_password' are given, but for HTTP Authentication, both must be set\." self.run_bot(parameters={'http_username': 'username'}, allowed_warning_count=1) self.assertLogMatches(log_line, 'WARNING') self.run_bot(parameters={'http_password': 'password'}, allowed_warning_count=1)