From 1bcf50287c10440f3f9f779841f54e5078574ae2 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 17 Jan 2020 12:27:08 +0000 Subject: [PATCH] fix failing test --- tests/__init__.py | 3 +++ tests/test_attributes.py | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index 97d6b43..c3c2070 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,7 +1,10 @@ +import logging from typing import Optional from matrix_synapse_saml_mozilla import SamlMappingProvider +logging.basicConfig() + def create_mapping_provider(config_dict: Optional[dict] = None) -> SamlMappingProvider: # Default configuration diff --git a/tests/test_attributes.py b/tests/test_attributes.py index de405ca..2aec556 100644 --- a/tests/test_attributes.py +++ b/tests/test_attributes.py @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging import re import time import unittest @@ -29,8 +28,6 @@ from matrix_synapse_saml_mozilla._sessions import username_mapping_sessions from . import create_mapping_provider -logging.basicConfig() - class FakeResponse: def __init__(self, source_uid, display_name): @@ -58,6 +55,8 @@ def _load_test_response() -> AuthnResponse: allow_unsolicited=True, # tell it not to check the `destination` asynchop=False, + # tell it not to check the issue time + timeslack=20 * 365 * 24 * 3600, ) response.loads(response_xml, decode=False, origxml=response_xml) response.verify()