diff --git a/.Pipelines/template-pipeline-stages.yml b/.Pipelines/template-pipeline-stages.yml index b763f01a..0b6b9742 100644 --- a/.Pipelines/template-pipeline-stages.yml +++ b/.Pipelines/template-pipeline-stages.yml @@ -121,16 +121,15 @@ stages: --benchmark-skip \ --timeout=120 \ --junitxml=test-results/junit-unit.xml \ + --log-file=test-results/pytest-unit.log \ --ignore=tests/test_e2e.py \ --ignore=tests/test_e2e_manual.py \ --ignore=tests/test_fmi_e2e.py \ --deselect tests/test_cryptography.py::CryptographyTestCase::test_ceiling_should_be_latest_cryptography_version_plus_three \ - --deselect tests/test_cryptography.py::CryptographyTestCase::test_should_be_run_with_latest_version_of_cryptography \ - 2>&1 | tee test-results/pytest-unit.log + --deselect tests/test_cryptography.py::CryptographyTestCase::test_should_be_run_with_latest_version_of_cryptography displayName: 'Run pytest (unit)' timeoutInMinutes: 5 env: - # Force unbuffered stdout so ADO logs stream in real time through the tee pipe. PYTHONUNBUFFERED: '1' # Run cryptography version-gating tests separately as a warning-only check. diff --git a/msal/wstrust_request.py b/msal/wstrust_request.py index 159375f3..56b0b82d 100644 --- a/msal/wstrust_request.py +++ b/msal/wstrust_request.py @@ -26,7 +26,7 @@ #------------------------------------------------------------------------------ import uuid -from datetime import datetime, timedelta +from datetime import datetime, timedelta, timezone import logging from .mex import Mex @@ -76,7 +76,7 @@ def wsu_time_format(datetime_obj): def _build_rst(username, password, cloud_audience_urn, endpoint_address, soap_action): - now = datetime.utcnow() + now = datetime.now(timezone.utc) return """ {soap_action}