Improve test cases to test header-less response #822
+14
−16
Merged
Azure Pipelines / AzureAD.microsoft-authentication-library-for-python (2708)
failed
May 20, 2025 in 1m 48s
Build #20250520.2 had test failures
Details
- Failed: 5 (0.49%, 1 new, 4 recurring)
- Passed: 823 (81.32%)
- Other: 184 (18.18%)
- Total: 1,012
Annotations
Check failure on line 80 in Build log
azure-pipelines / AzureAD.microsoft-authentication-library-for-python (2708)
Build log #L80
1 test(s) failed, 253 test(s) collected.
Check failure on line 145 in Build log
azure-pipelines / AzureAD.microsoft-authentication-library-for-python (2708)
Build log #L145
Bash exited with code '1'.
Check failure on line 77 in Build log
azure-pipelines / AzureAD.microsoft-authentication-library-for-python (2708)
Build log #L77
1 test(s) failed, 253 test(s) collected.
Check failure on line 142 in Build log
azure-pipelines / AzureAD.microsoft-authentication-library-for-python (2708)
Build log #L142
Bash exited with code '1'.
azure-pipelines / AzureAD.microsoft-authentication-library-for-python (2708)
tests/test_mi.py::ServiceFabricTestCase::test_happy_path_with_claim_challenge_should_send_sha256_to_provider
self = <tests.test_mi.ServiceFabricTestCase testMethod=test_happy_path_with_claim_challenge_should_send_sha256_to_provider>
def test_happy_path_with_claim_challenge_should_send_sha256_to_provider(self):
> self._test_happy_path(
self._build_app(client_capabilities=[]), # Test empty client_capabilities
claims_challenge='{"access_token": {"nbf": {"essential": true, "value": "1563308371"}}}',
).assert_called_with(
'http://localhost',
params={
'api-version': '2019-07-01-preview',
'resource': 'R',
'token_sha256_to_refresh': self.access_token_sha256,
# There is no xms_cc in this case
},
headers={'Secret': 'foo'},
)
tests/test_mi.py:327:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_mi.py:310: in _test_happy_path
super(ServiceFabricTestCase, self)._test_happy_path(
tests/test_mi.py:143: in _test_happy_path
self.assertEqual(expires_in, result["expires_in"], "Should have expected expires_in")
E AssertionError: 1234 != 1233 : Should have expected expires_in
Raw output
/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/unittest/case.py:830: AssertionError: 1234 != 1233 : Should have expected expires_in
Loading