Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion sdk/resources/azure-mgmt-resource/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
from dotenv import load_dotenv

from devtools_testutils import test_proxy, add_general_regex_sanitizer
from devtools_testutils import add_header_regex_sanitizer, add_body_key_sanitizer


# Ignore async tests for Python < 3.5
collect_ignore_glob = []
Expand All @@ -44,4 +46,7 @@ def add_sanitizers(test_proxy):
subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000")
tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=subscription_id, value="00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000")
add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]")
add_header_regex_sanitizer(key="Cookie", value="cookie;")
add_body_key_sanitizer(json_path="$..access_token", value="access_token")

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
"User-Agent": "azsdk-python-identity/1.8.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)"
"User-Agent": "azsdk-python-identity/1.9.0b1 Python/3.9.10 (Windows-10-10.0.22000-SP0)"
},
"RequestBody": null,
"StatusCode": 200,
Expand All @@ -17,17 +17,13 @@
"Cache-Control": "max-age=86400, private",
"Content-Length": "1753",
"Content-Type": "application/json; charset=utf-8",
"Date": "Tue, 25 Jan 2022 10:03:35 GMT",
"Date": "Fri, 04 Mar 2022 08:43:28 GMT",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Set-Cookie": [
"fpc=AoIiSpQDvylGqwYeeHVzaUOZHqKEBgAAAJ3BgdkOAAAA; expires=Thu, 24-Feb-2022 10:03:35 GMT; path=/; secure; HttpOnly; SameSite=None",
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
],
"Set-Cookie": "[set-cookie;]",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"x-ms-ests-server": "2.1.12261.22 - SCUS ProdSlices",
"x-ms-request-id": "3e279765-9c38-4434-8348-1fe1fa42f900"
"x-ms-ests-server": "2.1.12507.17 - NCUS ProdSlices",
"x-ms-request-id": "7fe2b7d9-45f9-4dc3-bea8-242810b66e00"
},
"ResponseBody": {
"token_endpoint": "https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token",
Expand Down Expand Up @@ -104,8 +100,8 @@
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
"Cookie": "fpc=AoIiSpQDvylGqwYeeHVzaUOZHqKEBgAAAJ3BgdkOAAAA; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
"User-Agent": "azsdk-python-identity/1.8.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)"
"Cookie": "cookie;",
"User-Agent": "azsdk-python-identity/1.9.0b1 Python/3.9.10 (Windows-10-10.0.22000-SP0)"
},
"RequestBody": null,
"StatusCode": 200,
Expand All @@ -115,17 +111,13 @@
"Cache-Control": "max-age=86400, private",
"Content-Length": "945",
"Content-Type": "application/json; charset=utf-8",
"Date": "Tue, 25 Jan 2022 10:03:35 GMT",
"Date": "Fri, 04 Mar 2022 08:43:29 GMT",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Set-Cookie": [
"fpc=AoIiSpQDvylGqwYeeHVzaUOZHqKEBgAAAJ3BgdkOAAAA; expires=Thu, 24-Feb-2022 10:03:36 GMT; path=/; secure; HttpOnly; SameSite=None",
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
],
"Set-Cookie": "[set-cookie;]",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"x-ms-ests-server": "2.1.12381.20 - KRSLR1 ProdSlices",
"x-ms-request-id": "16c0c1a8-7e57-4a92-82dd-c4e2c8aa1500"
"x-ms-ests-server": "2.1.12529.17 - SEASLR2 ProdSlices",
"x-ms-request-id": "0bf82154-3e6b-4659-9e29-e2a487e20e00"
},
"ResponseBody": {
"tenant_discovery_endpoint": "https://login.microsoftonline.com/common/.well-known/openid-configuration",
Expand Down Expand Up @@ -180,47 +172,43 @@
"RequestHeaders": {
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"client-request-id": "de878d05-20de-4450-8908-af67c6cb1e30",
"client-request-id": "cfb5d2c3-7456-4b86-ba66-be16e515e10b",
"Connection": "keep-alive",
"Content-Length": "289",
"Content-Type": "application/x-www-form-urlencoded",
"Cookie": "fpc=AoIiSpQDvylGqwYeeHVzaUOZHqKEBgAAAJ3BgdkOAAAA; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
"User-Agent": "azsdk-python-identity/1.8.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"Cookie": "cookie;",
"User-Agent": "azsdk-python-identity/1.9.0b1 Python/3.9.10 (Windows-10-10.0.22000-SP0)",
"x-client-cpu": "x64",
"x-client-current-telemetry": "4|730,0|",
"x-client-last-telemetry": "4|0|||",
"x-client-os": "win32",
"x-client-sku": "MSAL.Python",
"x-client-ver": "1.16.0",
"x-client-ver": "1.17.0",
"x-ms-lib-capability": "retry-after, h429"
},
"RequestBody": "client_id=a2df54d5-ab03-4725-9b80-9a00b3b1967f\u0026grant_type=client_credentials\u0026client_info=1\u0026client_secret=0vj7Q~IsFayrD0V_8oyOfygU-GE3ELOabq95a\u0026claims=%7B%22access_token%22%3A\u002B%7B%22xms_cc%22%3A\u002B%7B%22values%22%3A\u002B%5B%22CP1%22%5D%7D%7D%7D\u0026scope=https%3A%2F%2Fmanagement.azure.com%2F.default",
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-store, no-cache",
"client-request-id": "de878d05-20de-4450-8908-af67c6cb1e30",
"Content-Length": "1391",
"client-request-id": "cfb5d2c3-7456-4b86-ba66-be16e515e10b",
"Content-Length": "93",
"Content-Type": "application/json; charset=utf-8",
"Date": "Tue, 25 Jan 2022 10:03:36 GMT",
"Date": "Fri, 04 Mar 2022 08:43:29 GMT",
"Expires": "-1",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Pragma": "no-cache",
"Set-Cookie": [
"fpc=AoIiSpQDvylGqwYeeHVzaUOZHqKEBwAAAJ3BgdkOAAAA; expires=Thu, 24-Feb-2022 10:03:36 GMT; path=/; secure; HttpOnly; SameSite=None",
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
],
"Set-Cookie": "[set-cookie;]",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"x-ms-clitelem": "1,0,0,,",
"x-ms-ests-server": "2.1.12261.22 - NCUS ProdSlices",
"x-ms-request-id": "71bfed6b-af3a-4635-8840-bd4d8c1b3300"
"x-ms-ests-server": "2.1.12507.17 - SCUS ProdSlices",
"x-ms-request-id": "157ea030-3e22-4ca1-adf8-d7ab658fb100"
},
"ResponseBody": {
"token_type": "Bearer",
"expires_in": 3599,
"ext_expires_in": 3599,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1yNS1BVWliZkJpaTdOZDFqQmViYXhib1hXMCIsImtpZCI6Ik1yNS1BVWliZkJpaTdOZDFqQmViYXhib1hXMCJ9.eyJhdWQiOiJodH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rLENTgAycw74_m924HzR4pchrwc9_Q4MUCT88ji-964H9lSxPh0igCNT6Ab4EWK4jHwO3SP_7ilBUw6yOP2NMRGglQGSA"
"access_token": "access_token"
}
},
{
Expand All @@ -233,24 +221,28 @@
"Connection": "keep-alive",
"Content-Length": "41",
"Content-Type": "application/json",
"User-Agent": "azsdk-python-azure-mgmt-resource/20.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "0f03b6e7-7dc6-11ec-aee7-70b5e82527ff"
"User-Agent": "azsdk-python-azure-mgmt-resource/20.1.0 Python/3.9.10 (Windows-10-10.0.22000-SP0)",
"x-ms-client-request-id": "31e440e3-9b97-11ec-acd9-d08e79139a4a"
},
"RequestBody": {
"properties": {
"level": "CanNotDelete"
}
},
"RequestBody": "{\u0022properties\u0022: {\u0022level\u0022: \u0022CanNotDelete\u0022}}",
"StatusCode": 201,
"ResponseHeaders": {
"Cache-Control": "no-cache",
"Content-Length": "226",
"Content-Type": "application/json; charset=utf-8",
"Date": "Tue, 25 Jan 2022 10:03:36 GMT",
"Date": "Fri, 04 Mar 2022 08:43:30 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "99390311-3aaa-4405-bc75-6712f6ce6fad",
"x-ms-ratelimit-remaining-subscription-writes": "1191",
"x-ms-request-id": "southeastasia:7d746344-eb6c-48f2-9551-3e357d26dda5",
"x-ms-routing-request-id": "SOUTHEASTASIA:20220125T100336Z:99390311-3aaa-4405-bc75-6712f6ce6fad"
"x-ms-correlation-request-id": "319ef80f-2d11-4c61-b388-e5f32efaed9b",
"x-ms-ratelimit-remaining-subscription-writes": "1189",
"x-ms-request-id": "southeastasia:2cb31426-f856-4f97-acba-6689f1f5a67d",
"x-ms-routing-request-id": "SOUTHEASTASIA:20220304T084330Z:319ef80f-2d11-4c61-b388-e5f32efaed9b"
},
"ResponseBody": {
"properties": {
Expand All @@ -269,16 +261,16 @@
"Accept-Encoding": "gzip, deflate",
"Authorization": "Sanitized",
"Connection": "keep-alive",
"User-Agent": "azsdk-python-azure-mgmt-resource/20.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "0fa51f05-7dc6-11ec-910e-70b5e82527ff"
"User-Agent": "azsdk-python-azure-mgmt-resource/20.1.0 Python/3.9.10 (Windows-10-10.0.22000-SP0)",
"x-ms-client-request-id": "329045d2-9b97-11ec-9783-d08e79139a4a"
},
"RequestBody": null,
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-cache",
"Content-Encoding": "gzip",
"Content-Type": "application/json; charset=utf-8",
"Date": "Tue, 25 Jan 2022 10:03:36 GMT",
"Date": "Fri, 04 Mar 2022 08:43:30 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
Expand All @@ -288,10 +280,10 @@
"Accept-Encoding"
],
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "089933a0-235c-447d-b754-68f7bf27c5cb",
"x-ms-ratelimit-remaining-subscription-reads": "11992",
"x-ms-request-id": "southeastasia:dd23ce59-4dd0-429b-b252-130416a941fb",
"x-ms-routing-request-id": "SOUTHEASTASIA:20220125T100336Z:089933a0-235c-447d-b754-68f7bf27c5cb"
"x-ms-correlation-request-id": "e538c2b6-b968-4d08-98e8-3a08332d1e7b",
"x-ms-ratelimit-remaining-subscription-reads": "11983",
"x-ms-request-id": "southeastasia:fdef5bc5-b437-411d-8c28-5ad757d27b30",
"x-ms-routing-request-id": "SOUTHEASTASIA:20220304T084330Z:e538c2b6-b968-4d08-98e8-3a08332d1e7b"
},
"ResponseBody": {
"properties": {
Expand All @@ -310,16 +302,16 @@
"Accept-Encoding": "gzip, deflate",
"Authorization": "Sanitized",
"Connection": "keep-alive",
"User-Agent": "azsdk-python-azure-mgmt-resource/20.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "0fbe296d-7dc6-11ec-adf9-70b5e82527ff"
"User-Agent": "azsdk-python-azure-mgmt-resource/20.1.0 Python/3.9.10 (Windows-10-10.0.22000-SP0)",
"x-ms-client-request-id": "32a3d43f-9b97-11ec-868b-d08e79139a4a"
},
"RequestBody": null,
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-cache",
"Content-Encoding": "gzip",
"Content-Type": "application/json; charset=utf-8",
"Date": "Tue, 25 Jan 2022 10:03:36 GMT",
"Date": "Fri, 04 Mar 2022 08:43:30 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
Expand All @@ -329,10 +321,10 @@
"Accept-Encoding"
],
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "006f3433-ef98-464d-9907-2cc1bde2f408",
"x-ms-ratelimit-remaining-subscription-reads": "11991",
"x-ms-request-id": "southeastasia:3f1b3094-28bb-4b2b-bf90-98278cb7d8cd",
"x-ms-routing-request-id": "SOUTHEASTASIA:20220125T100337Z:006f3433-ef98-464d-9907-2cc1bde2f408"
"x-ms-correlation-request-id": "d4daf121-cf4d-476a-b37e-a9575451a525",
"x-ms-ratelimit-remaining-subscription-reads": "11982",
"x-ms-request-id": "southeastasia:d4973db8-2bf1-4f20-9734-85344f76ec6c",
"x-ms-routing-request-id": "SOUTHEASTASIA:20220304T084331Z:d4daf121-cf4d-476a-b37e-a9575451a525"
},
"ResponseBody": {
"value": [
Expand All @@ -356,23 +348,23 @@
"Authorization": "Sanitized",
"Connection": "keep-alive",
"Content-Length": "0",
"User-Agent": "azsdk-python-azure-mgmt-resource/20.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "0fd0baa6-7dc6-11ec-98aa-70b5e82527ff"
"User-Agent": "azsdk-python-azure-mgmt-resource/20.1.0 Python/3.9.10 (Windows-10-10.0.22000-SP0)",
"x-ms-client-request-id": "32b9c850-9b97-11ec-b3b5-d08e79139a4a"
},
"RequestBody": null,
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-cache",
"Content-Length": "0",
"Date": "Tue, 25 Jan 2022 10:03:36 GMT",
"Date": "Fri, 04 Mar 2022 08:43:30 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "05fda296-1385-4056-b52f-24fd92ec28a6",
"x-ms-ratelimit-remaining-subscription-deletes": "14994",
"x-ms-request-id": "southeastasia:4e5b43e8-942b-44a2-9123-7c355a7c81d3",
"x-ms-routing-request-id": "SOUTHEASTASIA:20220125T100337Z:05fda296-1385-4056-b52f-24fd92ec28a6"
"x-ms-correlation-request-id": "21bedf8d-b1f9-4383-8549-7e3c385ce77c",
"x-ms-ratelimit-remaining-subscription-deletes": "14992",
"x-ms-request-id": "southeastasia:5c9a7ff6-98cb-4f42-aca4-776a7d8b055e",
"x-ms-routing-request-id": "SOUTHEASTASIA:20220304T084331Z:21bedf8d-b1f9-4383-8549-7e3c385ce77c"
},
"ResponseBody": null
}
Expand Down
Loading