From 821af02fce4f03fdd60c5dcc7995d780be79ba2c Mon Sep 17 00:00:00 2001 From: Lukas Bednar Date: Fri, 12 Apr 2024 13:40:48 +0200 Subject: [PATCH] Fix the test for unauthorized access Signed-off-by: Lukas Bednar --- tests/test_jira.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_jira.py b/tests/test_jira.py index adb4fa0..4dd2c1a 100644 --- a/tests/test_jira.py +++ b/tests/test_jira.py @@ -1,4 +1,5 @@ import os +import re from packaging.version import Version import pytest @@ -466,7 +467,9 @@ def test_pass(): '--jira-password', 'passwd123' ) result = testdir.runpytest(*ARGS) - assert '401 Client Error' in result.stdout.str() + assert re.search( + "4(01|29) Client Error", result.stdout.str(), re.MULTILINE + ) def test_disabled_ssl_verification_pass(testdir):