Exemple #1
0
def test_pass_in_http_logging_policy():
    config = Configuration()
    http_logging_policy = ARMHttpLoggingPolicy()
    http_logging_policy.allowed_header_names.update(
        {"x-ms-added-header"}
    )
    config.http_logging_policy = http_logging_policy

    pipeline_client = AsyncARMPipelineClient(base_url="test", config=config)
    http_logging_policy = pipeline_client._default_policies(config=config)[-1]
    assert http_logging_policy.allowed_header_names == ARMHttpLoggingPolicy.DEFAULT_HEADERS_WHITELIST.union({"x-ms-added-header"})
Exemple #2
0
def test_default_http_logging_policy():
    config = Configuration()
    pipeline_client = AsyncARMPipelineClient(base_url="test", config=config)
    http_logging_policy = pipeline_client._default_policies(config=config)[-1]
    assert http_logging_policy.allowed_header_names == ARMHttpLoggingPolicy.DEFAULT_HEADERS_WHITELIST