From 072f079d9fcaa9953c239473762b3311086f6c17 Mon Sep 17 00:00:00 2001 From: Michael Schlenker Date: Wed, 28 Feb 2024 11:55:31 +0100 Subject: [PATCH] Fix test to use Logrecord args instead of msg --- tests/test_oic_provider.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_oic_provider.py b/tests/test_oic_provider.py index 677809d9..7f177322 100644 --- a/tests/test_oic_provider.py +++ b/tests/test_oic_provider.py @@ -1349,12 +1349,12 @@ def test_verify_sector_identifier_no_scheme(self): assert len(logcap.records) == 2 # First log record is from server... - assert isinstance(logcap.records[1].msg, MissingSchema) + assert isinstance(logcap.records[1].args[0], MissingSchema) error = ( "Invalid URL 'example.com': No scheme supplied. Perhaps you meant " "https://example.com?" ) - assert str(logcap.records[1].msg) == error + assert logcap.records[1].getMessage() == error def test_verify_sector_identifier_nonreachable(self): rr = RegistrationRequest( @@ -1386,7 +1386,7 @@ def test_verify_sector_identifier_error(self): assert len(logcap.records) == 2 # First log record is from server... - assert logcap.records[1].msg == error + assert logcap.records[1].args[0] == error def test_verify_sector_identifier_malformed(self): rr = RegistrationRequest(