diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureBodyDuration/autorestdurationtestservice/operations/duration_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureBodyDuration/autorestdurationtestservice/operations/duration_operations.py index 255f4e6b66..db838547b4 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureBodyDuration/autorestdurationtestservice/operations/duration_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureBodyDuration/autorestdurationtestservice/operations/duration_operations.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null duration value @@ -81,7 +81,7 @@ def get_null( return deserialized def put_positive_duration( - self, duration_body, custom_headers={}, raw=False, **operation_config): + self, duration_body, custom_headers=None, raw=False, **operation_config): """ Put a positive duration value @@ -128,7 +128,7 @@ def put_positive_duration( return client_raw_response def get_positive_duration( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get a positive duration value @@ -176,7 +176,7 @@ def get_positive_duration( return deserialized def get_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an invalid duration value diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureParameterGrouping/autorestparametergroupingtestservice/operations/parameter_grouping_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureParameterGrouping/autorestparametergroupingtestservice/operations/parameter_grouping_operations.py index 673a139143..27541e740e 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureParameterGrouping/autorestparametergroupingtestservice/operations/parameter_grouping_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureParameterGrouping/autorestparametergroupingtestservice/operations/parameter_grouping_operations.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def post_required( - self, parameter_grouping_post_required_parameters, custom_headers={}, raw=False, **operation_config): + self, parameter_grouping_post_required_parameters, custom_headers=None, raw=False, **operation_config): """ Post a bunch of required parameters grouped @@ -104,7 +104,7 @@ def post_required( return client_raw_response def post_optional( - self, parameter_grouping_post_optional_parameters=None, custom_headers={}, raw=False, **operation_config): + self, parameter_grouping_post_optional_parameters=None, custom_headers=None, raw=False, **operation_config): """ Post a bunch of optional parameters grouped @@ -161,7 +161,7 @@ def post_optional( return client_raw_response def post_multi_param_groups( - self, first_parameter_group=None, parameter_grouping_post_multi_param_groups_second_param_group=None, custom_headers={}, raw=False, **operation_config): + self, first_parameter_group=None, parameter_grouping_post_multi_param_groups_second_param_group=None, custom_headers=None, raw=False, **operation_config): """ Post parameters from multiple different parameter groups @@ -231,7 +231,7 @@ def post_multi_param_groups( return client_raw_response def post_shared_parameter_group_object( - self, first_parameter_group=None, custom_headers={}, raw=False, **operation_config): + self, first_parameter_group=None, custom_headers=None, raw=False, **operation_config): """ Post parameters with a shared parameter group object diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureReport/autorestreportserviceforazure/auto_rest_report_service_for_azure.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureReport/autorestreportserviceforazure/auto_rest_report_service_for_azure.py index 948ebd9677..202ecaa8ad 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureReport/autorestreportserviceforazure/auto_rest_report_service_for_azure.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureReport/autorestreportserviceforazure/auto_rest_report_service_for_azure.py @@ -96,7 +96,7 @@ def __init__( def get_report( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get test coverage report diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureResource/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureResource/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py index 872a69a821..4efa7f43c5 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureResource/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureResource/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py @@ -96,7 +96,7 @@ def __init__( def put_array( - self, resource_array=None, custom_headers={}, raw=False, **operation_config): + self, resource_array=None, custom_headers=None, raw=False, **operation_config): """ Put External Resource as an Array @@ -147,7 +147,7 @@ def put_array( return client_raw_response def get_array( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get External Resource as an Array @@ -196,7 +196,7 @@ def get_array( return deserialized def put_dictionary( - self, resource_dictionary=None, custom_headers={}, raw=False, **operation_config): + self, resource_dictionary=None, custom_headers=None, raw=False, **operation_config): """ Put External Resource as a Dictionary @@ -246,7 +246,7 @@ def put_dictionary( return client_raw_response def get_dictionary( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get External Resource as a Dictionary @@ -294,7 +294,7 @@ def get_dictionary( return deserialized def put_resource_collection( - self, resource_complex_object=None, custom_headers={}, raw=False, **operation_config): + self, resource_complex_object=None, custom_headers=None, raw=False, **operation_config): """ Put External Resource as a ResourceCollection @@ -346,7 +346,7 @@ def put_resource_collection( return client_raw_response def get_resource_collection( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get External Resource as a ResourceCollection diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/api_version_default_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/api_version_default_operations.py index 77db1896b3..874e55a3cf 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/api_version_default_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/api_version_default_operations.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_method_global_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ GET method with api-version modeled in global settings. @@ -75,7 +75,7 @@ def get_method_global_valid( return client_raw_response def get_method_global_not_provided_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ GET method with api-version modeled in global settings. @@ -117,7 +117,7 @@ def get_method_global_not_provided_valid( return client_raw_response def get_path_global_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ GET method with api-version modeled in global settings. @@ -159,7 +159,7 @@ def get_path_global_valid( return client_raw_response def get_swagger_global_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ GET method with api-version modeled in global settings. diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/api_version_local_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/api_version_local_operations.py index 7ba723b1f3..e5b30970f1 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/api_version_local_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/api_version_local_operations.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_method_local_valid( - self, api_version="2.0", custom_headers={}, raw=False, **operation_config): + self, api_version="2.0", custom_headers=None, raw=False, **operation_config): """ Get method with api-version modeled in the method. pass in api-version = '2.0' to succeed @@ -79,7 +79,7 @@ def get_method_local_valid( return client_raw_response def get_method_local_null( - self, api_version=None, custom_headers={}, raw=False, **operation_config): + self, api_version=None, custom_headers=None, raw=False, **operation_config): """ Get method with api-version modeled in the method. pass in api-version = null to succeed @@ -126,7 +126,7 @@ def get_method_local_null( return client_raw_response def get_path_local_valid( - self, api_version="2.0", custom_headers={}, raw=False, **operation_config): + self, api_version="2.0", custom_headers=None, raw=False, **operation_config): """ Get method with api-version modeled in the method. pass in api-version = '2.0' to succeed @@ -172,7 +172,7 @@ def get_path_local_valid( return client_raw_response def get_swagger_local_valid( - self, api_version="2.0", custom_headers={}, raw=False, **operation_config): + self, api_version="2.0", custom_headers=None, raw=False, **operation_config): """ Get method with api-version modeled in the method. pass in api-version = '2.0' to succeed diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/header_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/header_operations.py index c25794e67a..3900422185 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/header_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/header_operations.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def custom_named_request_id( - self, foo_client_request_id, custom_headers={}, raw=False, **operation_config): + self, foo_client_request_id, custom_headers=None, raw=False, **operation_config): """ Send foo-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/odata_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/odata_operations.py index fb33e1238a..efff53fb99 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/odata_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/odata_operations.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_with_filter( - self, filter=None, top=None, orderby=None, custom_headers={}, raw=False, **operation_config): + self, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): """ Specify filter parameter with value '$filter=id gt 5 and name eq 'foo'&$orderby=id&$top=10' diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/skip_url_encoding_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/skip_url_encoding_operations.py index 3e289ed433..b657cd53af 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/skip_url_encoding_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/skip_url_encoding_operations.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_method_path_valid( - self, unencoded_path_param, custom_headers={}, raw=False, **operation_config): + self, unencoded_path_param, custom_headers=None, raw=False, **operation_config): """ Get method with unencoded path parameter with value 'path1/path2/path3' @@ -81,7 +81,7 @@ def get_method_path_valid( return client_raw_response def get_path_path_valid( - self, unencoded_path_param, custom_headers={}, raw=False, **operation_config): + self, unencoded_path_param, custom_headers=None, raw=False, **operation_config): """ Get method with unencoded path parameter with value 'path1/path2/path3' @@ -129,7 +129,7 @@ def get_path_path_valid( return client_raw_response def get_swagger_path_valid( - self, unencoded_path_param="path1/path2/path3", custom_headers={}, raw=False, **operation_config): + self, unencoded_path_param="path1/path2/path3", custom_headers=None, raw=False, **operation_config): """ Get method with unencoded path parameter with value 'path1/path2/path3' @@ -177,7 +177,7 @@ def get_swagger_path_valid( return client_raw_response def get_method_query_valid( - self, q1, custom_headers={}, raw=False, **operation_config): + self, q1, custom_headers=None, raw=False, **operation_config): """ Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3' @@ -223,7 +223,7 @@ def get_method_query_valid( return client_raw_response def get_method_query_null( - self, q1=None, custom_headers={}, raw=False, **operation_config): + self, q1=None, custom_headers=None, raw=False, **operation_config): """ Get method with unencoded query parameter with value null @@ -268,7 +268,7 @@ def get_method_query_null( return client_raw_response def get_path_query_valid( - self, q1, custom_headers={}, raw=False, **operation_config): + self, q1, custom_headers=None, raw=False, **operation_config): """ Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3' @@ -314,7 +314,7 @@ def get_path_query_valid( return client_raw_response def get_swagger_query_valid( - self, q1="value1&q2=value2&q3=value3", custom_headers={}, raw=False, **operation_config): + self, q1="value1&q2=value2&q3=value3", custom_headers=None, raw=False, **operation_config): """ Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3' diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/subscription_in_credentials_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/subscription_in_credentials_operations.py index 7a1f0e632f..b14e40ea25 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/subscription_in_credentials_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/subscription_in_credentials_operations.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def post_method_global_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed @@ -79,7 +79,7 @@ def post_method_global_valid( return client_raw_response def post_method_global_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to null, and client-side validation should @@ -126,7 +126,7 @@ def post_method_global_null( return client_raw_response def post_method_global_not_provided_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed @@ -173,7 +173,7 @@ def post_method_global_not_provided_valid( return client_raw_response def post_path_global_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed @@ -219,7 +219,7 @@ def post_path_global_valid( return client_raw_response def post_swagger_global_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/subscription_in_method_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/subscription_in_method_operations.py index a10cf1f70b..9386906cae 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/subscription_in_method_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/subscription_in_method_operations.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def post_method_local_valid( - self, subscription_id, custom_headers={}, raw=False, **operation_config): + self, subscription_id, custom_headers=None, raw=False, **operation_config): """ POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed @@ -82,7 +82,7 @@ def post_method_local_valid( return client_raw_response def post_method_local_null( - self, subscription_id, custom_headers={}, raw=False, **operation_config): + self, subscription_id, custom_headers=None, raw=False, **operation_config): """ POST method with subscriptionId modeled in the method. pass in subscription id = null, client-side validation should prevent you @@ -132,7 +132,7 @@ def post_method_local_null( return client_raw_response def post_path_local_valid( - self, subscription_id, custom_headers={}, raw=False, **operation_config): + self, subscription_id, custom_headers=None, raw=False, **operation_config): """ POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed @@ -181,7 +181,7 @@ def post_path_local_valid( return client_raw_response def post_swagger_local_valid( - self, subscription_id, custom_headers={}, raw=False, **operation_config): + self, subscription_id, custom_headers=None, raw=False, **operation_config): """ POST method with subscriptionId modeled in the method. pass in subscription id = '1234-5678-9012-3456' to succeed diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/xms_client_request_id_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/xms_client_request_id_operations.py index 03f60b4d3e..d68315d835 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/xms_client_request_id_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/xms_client_request_id_operations.py @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get method that overwrites x-ms-client-request header with value 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. @@ -78,7 +78,7 @@ def get( return client_raw_response def param_get( - self, x_ms_client_request_id, custom_headers={}, raw=False, **operation_config): + self, x_ms_client_request_id, custom_headers=None, raw=False, **operation_config): """ Get method that overwrites x-ms-client-request header with value 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/operations/paths_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/operations/paths_operations.py index a7aaf4792f..3e293149bc 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/operations/paths_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/operations/paths_operations.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_empty( - self, account_name, custom_headers={}, raw=False, **operation_config): + self, account_name, custom_headers=None, raw=False, **operation_config): """ Get a 200 to test a valid base uri diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Head/autorestheadtestservice/operations/http_success_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Head/autorestheadtestservice/operations/http_success_operations.py index e490d4818d..8f14a81b39 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Head/autorestheadtestservice/operations/http_success_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Head/autorestheadtestservice/operations/http_success_operations.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def head200( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 200 status code if successful @@ -77,7 +77,7 @@ def head200( return deserialized def head204( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 204 status code if successful @@ -122,7 +122,7 @@ def head204( return deserialized def head404( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 404 status code if successful diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/HeadExceptions/autorestheadexceptiontestservice/operations/head_exception_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/HeadExceptions/autorestheadexceptiontestservice/operations/head_exception_operations.py index 4d7d386b49..65669404b4 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/HeadExceptions/autorestheadexceptiontestservice/operations/head_exception_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/HeadExceptions/autorestheadexceptiontestservice/operations/head_exception_operations.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def head200( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 200 status code if successful @@ -75,7 +75,7 @@ def head200( return client_raw_response def head204( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 204 status code if successful @@ -118,7 +118,7 @@ def head204( return client_raw_response def head404( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 404 status code if successful diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_custom_header_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_custom_header_operations.py index 96ade6d8e3..105c79d96f 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_custom_header_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_custom_header_operations.py @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def put_async_retry_succeeded( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. Long running put request, @@ -85,10 +85,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -129,7 +130,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put201_creating_succeeded200( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. Long running put request, @@ -179,10 +180,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -218,7 +220,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post202_retry200( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. Long running post request, @@ -267,10 +269,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -301,7 +304,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post_async_retry_succeeded( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. Long running post request, @@ -350,10 +353,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_operations.py index 4a078a8a86..00a39dccab 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_operations.py @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def put200_succeeded( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Succeeded’. @@ -82,10 +82,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -119,7 +120,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put200_succeeded_no_state( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 200 to the initial request, with an entity that does not contain @@ -167,10 +168,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -204,7 +206,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put202_retry200( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 202 to the initial request, with a location header that points to a polling URL that @@ -252,10 +254,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -289,7 +292,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put201_creating_succeeded200( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -338,10 +341,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -377,7 +381,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put200_updating_succeeded204( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Updating’. @@ -426,10 +430,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -463,7 +468,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put201_creating_failed200( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Created’. @@ -512,10 +517,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -551,7 +557,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put200_acceptedcanceled200( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -600,10 +606,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -637,7 +644,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_no_header_in_retry( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 202 to the initial request with location header. Subsequent calls to operation status do not @@ -685,10 +692,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -727,7 +735,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_async_retry_succeeded( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -776,10 +784,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -820,7 +829,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_async_no_retry_succeeded( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -869,10 +878,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -912,7 +922,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_async_retry_failed( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -961,10 +971,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1005,7 +1016,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_async_no_retrycanceled( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -1054,10 +1065,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1097,7 +1109,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_async_no_header_in_retry( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 202 to the initial request with Azure-AsyncOperation header. Subsequent calls to operation @@ -1145,10 +1157,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1187,7 +1200,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_non_resource( - self, sku=None, custom_headers={}, raw=False, **operation_config): + self, sku=None, custom_headers=None, raw=False, **operation_config): """ Long running put request with non resource. @@ -1232,10 +1245,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1269,7 +1283,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_async_non_resource( - self, sku=None, custom_headers={}, raw=False, **operation_config): + self, sku=None, custom_headers=None, raw=False, **operation_config): """ Long running put request with non resource. @@ -1314,10 +1328,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1351,7 +1366,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_sub_resource( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request with sub resource. @@ -1397,10 +1412,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1434,7 +1450,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_async_sub_resource( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request with sub resource. @@ -1480,10 +1496,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1517,7 +1534,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_provisioning202_accepted200_succeeded( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Accepted’. @@ -1556,10 +1573,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1605,7 +1623,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_provisioning202_deleting_failed200( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -1644,10 +1662,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1693,7 +1712,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_provisioning202_deletingcanceled200( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -1732,10 +1751,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1781,7 +1801,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete204_succeeded( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete succeeds and returns right away @@ -1816,10 +1836,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1846,7 +1867,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete202_retry200( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request. Polls return this value until the last poll returns a ‘200’ @@ -1884,10 +1905,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1927,7 +1949,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete202_no_retry204( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request. Polls return this value until the last poll returns a ‘200’ @@ -1965,10 +1987,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2008,7 +2031,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_no_header_in_retry( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a location header in the initial request. Subsequent calls to operation status do not contain @@ -2045,10 +2068,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2078,7 +2102,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_async_no_header_in_retry( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns an Azure-AsyncOperation header in the initial request. Subsequent calls to operation status @@ -2115,10 +2139,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2148,7 +2173,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_async_retry_succeeded( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation @@ -2185,10 +2210,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2220,7 +2246,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_async_no_retry_succeeded( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation @@ -2257,10 +2283,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2292,7 +2319,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_async_retry_failed( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation @@ -2329,10 +2356,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2364,7 +2392,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_async_retrycanceled( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation @@ -2401,10 +2429,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2436,7 +2465,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post200_with_payload( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 to the initial request, with 'Location' header. Poll returns a 200 with a response @@ -2474,10 +2503,11 @@ def long_running_send(): request = self._client.post(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2513,7 +2543,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post202_retry200( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a @@ -2560,10 +2590,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2594,7 +2625,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post202_no_retry204( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 to the initial request, with 'Location' header, 204 with noresponse body after @@ -2642,10 +2673,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2685,7 +2717,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post_async_retry_succeeded( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -2734,10 +2766,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2778,7 +2811,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post_async_no_retry_succeeded( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -2827,10 +2860,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2871,7 +2905,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post_async_retry_failed( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -2919,10 +2953,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2954,7 +2989,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post_async_retrycanceled( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -3002,10 +3037,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lro_retrys_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lro_retrys_operations.py index 786c3c3bf6..0730706150 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lro_retrys_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lro_retrys_operations.py @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def put201_creating_succeeded200( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 500, then a 201 to the initial request, with an entity that contains @@ -84,10 +84,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -123,7 +124,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_async_relative_retry_succeeded( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 500, then a 200 to the initial request, with an entity that contains @@ -172,10 +173,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -216,7 +218,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_provisioning202_accepted200_succeeded( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 500, then a 202 to the initial request, with an entity that contains @@ -255,10 +257,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -304,7 +307,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete202_retry200( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 500, then a 202 to the initial request. Polls return this value until the last poll returns @@ -341,10 +344,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -375,7 +379,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_async_relative_retry_succeeded( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 500, then a 202 to the initial request. Poll the endpoint indicated in the @@ -412,10 +416,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -447,7 +452,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post202_retry200( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 500, then a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls @@ -494,10 +499,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -528,7 +534,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post_async_relative_retry_succeeded( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 500, then a 202 to the initial request, with an entity that contains @@ -576,10 +582,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lrosa_ds_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lrosa_ds_operations.py index a211b6975e..335678d8e5 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lrosa_ds_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lrosa_ds_operations.py @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def put_non_retry400( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 400 to the initial request @@ -81,10 +81,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -120,7 +121,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_non_retry201_creating400( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a Product with 'ProvisioningState' = 'Creating' and 201 response code @@ -167,10 +168,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -206,7 +208,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_non_retry201_creating400_invalid_json( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a Product with 'ProvisioningState' = 'Creating' and 201 response code @@ -253,10 +255,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -292,7 +295,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_async_relative_retry400( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 200 with ProvisioningState=’Creating’. Poll the endpoint indicated in the @@ -340,10 +343,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -384,7 +388,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_non_retry400( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 400 with an error body @@ -419,10 +423,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -453,7 +458,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete202_non_retry400( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 with a location header @@ -489,10 +494,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -523,7 +529,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_async_relative_retry400( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation @@ -560,10 +566,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -595,7 +602,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post_non_retry400( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 400 with no error body @@ -640,10 +647,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -674,7 +682,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post202_non_retry400( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 with a location header @@ -719,10 +727,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -753,7 +762,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post_async_relative_retry400( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 to the initial request Poll the endpoint indicated in the Azure-AsyncOperation @@ -800,10 +809,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -835,7 +845,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_error201_no_provisioning_state_payload( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 201 to the initial request with no payload @@ -882,10 +892,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -921,7 +932,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_async_relative_retry_no_status( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -970,10 +981,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1014,7 +1026,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_async_relative_retry_no_status_payload( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -1063,10 +1075,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1107,7 +1120,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete204_succeeded( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 204 to the initial request, indicating success. @@ -1143,10 +1156,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1173,7 +1187,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_async_relative_retry_no_status( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation @@ -1210,10 +1224,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1245,7 +1260,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post202_no_location( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 to the initial request, without a location header. @@ -1291,10 +1306,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1325,7 +1341,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post_async_relative_retry_no_payload( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -1373,10 +1389,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1408,7 +1425,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put200_invalid_json( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 200 to the initial request, with an entity that is not a valid json @@ -1455,10 +1472,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1492,7 +1510,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_async_relative_retry_invalid_header( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -1540,10 +1558,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1584,7 +1603,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def put_async_relative_retry_invalid_json_polling( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -1633,10 +1652,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1677,7 +1697,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete202_retry_invalid_header( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request receing a reponse with an invalid 'Location' and @@ -1714,10 +1734,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1748,7 +1769,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_async_relative_retry_invalid_header( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request. The endpoint indicated in the Azure-AsyncOperation header is @@ -1785,10 +1806,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1820,7 +1842,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete_async_relative_retry_invalid_json_polling( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation @@ -1857,10 +1879,11 @@ def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1892,7 +1915,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post202_retry_invalid_header( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 to the initial request, with invalid 'Location' and 'Retry-After' headers. @@ -1938,10 +1961,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -1972,7 +1996,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post_async_relative_retry_invalid_header( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -2019,10 +2043,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -2054,7 +2079,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def post_async_relative_retry_invalid_json_polling( - self, product=None, custom_headers={}, raw=False, **operation_config): + self, product=None, custom_headers=None, raw=False, **operation_config): """ Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. @@ -2102,10 +2127,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Paging/autorestpagingtestservice/operations/paging_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Paging/autorestpagingtestservice/operations/paging_operations.py index a09052357a..d43a7e29ce 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Paging/autorestpagingtestservice/operations/paging_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Paging/autorestpagingtestservice/operations/paging_operations.py @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_single_pages( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ A paging operation that finishes on the first call without a nextlink @@ -92,7 +92,7 @@ def internal_paging(next_link=None, raw=False): return deserialized def get_multiple_pages( - self, client_request_id=None, paging_get_multiple_pages_options=None, custom_headers={}, raw=False, **operation_config): + self, client_request_id=None, paging_get_multiple_pages_options=None, custom_headers=None, raw=False, **operation_config): """ A paging operation that includes a nextLink that has 10 pages @@ -170,7 +170,7 @@ def internal_paging(next_link=None, raw=False): return deserialized def get_multiple_pages_with_offset( - self, paging_get_multiple_pages_with_offset_options, client_request_id=None, custom_headers={}, raw=False, **operation_config): + self, paging_get_multiple_pages_with_offset_options, client_request_id=None, custom_headers=None, raw=False, **operation_config): """ A paging operation that includes a nextLink that has 10 pages @@ -255,7 +255,7 @@ def internal_paging(next_link=None, raw=False): return deserialized def get_multiple_pages_retry_first( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ A paging operation that fails on the first call with 500 and then retries and then get a response including a nextLink that has 10 pages @@ -314,7 +314,7 @@ def internal_paging(next_link=None, raw=False): return deserialized def get_multiple_pages_retry_second( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ A paging operation that includes a nextLink that has 10 pages, of which the 2nd call fails first with 500. The client should retry and @@ -374,7 +374,7 @@ def internal_paging(next_link=None, raw=False): return deserialized def get_single_pages_failure( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ A paging operation that receives a 400 on the first call @@ -432,7 +432,7 @@ def internal_paging(next_link=None, raw=False): return deserialized def get_multiple_pages_failure( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ A paging operation that receives a 400 on the second call @@ -490,7 +490,7 @@ def internal_paging(next_link=None, raw=False): return deserialized def get_multiple_pages_failure_uri( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ A paging operation that receives an invalid nextLink diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/operations/storage_accounts_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/operations/storage_accounts_operations.py index 8d54b890d7..d2583af6ef 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/operations/storage_accounts_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/operations/storage_accounts_operations.py @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def check_name_availability( - self, account_name, custom_headers={}, raw=False, **operation_config): + self, account_name, custom_headers=None, raw=False, **operation_config): """ Checks that account name is valid and is not in use. @@ -102,7 +102,7 @@ def check_name_availability( return deserialized def create( - self, resource_group_name, account_name, parameters, custom_headers={}, raw=False, **operation_config): + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): """ Asynchronously creates a new storage account with the specified parameters. Existing accounts cannot be updated with this API and @@ -164,10 +164,11 @@ def long_running_send(): return self._client.send( request, header_parameters, body_content, **operation_config) - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @@ -201,7 +202,7 @@ def get_long_running_output(response): get_long_running_status, long_running_operation_timeout) def delete( - self, resource_group_name, account_name, custom_headers={}, raw=False, **operation_config): + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): """ Deletes a storage account in Microsoft Azure. @@ -259,7 +260,7 @@ def delete( return client_raw_response def get_properties( - self, resource_group_name, account_name, custom_headers={}, raw=False, **operation_config): + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): """ Returns the properties for the specified storage account including but not limited to name, account type, location, and account status. The @@ -327,7 +328,7 @@ def get_properties( return deserialized def update( - self, resource_group_name, account_name, parameters, custom_headers={}, raw=False, **operation_config): + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): """ Updates the account type or tags for a storage account. It can also be used to add a custom domain (note that custom domains cannot be added @@ -410,7 +411,7 @@ def update( return deserialized def list_keys( - self, resource_group_name, account_name, custom_headers={}, raw=False, **operation_config): + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): """ Lists the access keys for the specified storage account. @@ -472,7 +473,7 @@ def list_keys( return deserialized def list( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for @@ -537,7 +538,7 @@ def internal_paging(next_link=None, raw=False): return deserialized def list_by_resource_group( - self, resource_group_name, custom_headers={}, raw=False, **operation_config): + self, resource_group_name, custom_headers=None, raw=False, **operation_config): """ Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys @@ -606,7 +607,7 @@ def internal_paging(next_link=None, raw=False): return deserialized def regenerate_key( - self, resource_group_name, account_name, key_name=None, custom_headers={}, raw=False, **operation_config): + self, resource_group_name, account_name, key_name=None, custom_headers=None, raw=False, **operation_config): """ Regenerates the access keys for the specified storage account. diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/operations/usage_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/operations/usage_operations.py index 80b0c0aca8..c4401f53ec 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/operations/usage_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/operations/usage_operations.py @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Gets the current usage count and the limit for the resources under the subscription. diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/microsoftazuretesturl/operations/group_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/microsoftazuretesturl/operations/group_operations.py index 07c0bf0c8c..0ed768dc0f 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/microsoftazuretesturl/operations/group_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/microsoftazuretesturl/operations/group_operations.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_sample_resource_group( - self, resource_group_name, custom_headers={}, raw=False, **operation_config): + self, resource_group_name, custom_headers=None, raw=False, **operation_config): """ Provides a resouce group with name 'testgroup101' and location 'West US'. diff --git a/AutoRest/Generators/Python/Azure.Python/Templates/AzureLongRunningMethodTemplate.cshtml b/AutoRest/Generators/Python/Azure.Python/Templates/AzureLongRunningMethodTemplate.cshtml index 78533cd451..ed54f678d5 100644 --- a/AutoRest/Generators/Python/Azure.Python/Templates/AzureLongRunningMethodTemplate.cshtml +++ b/AutoRest/Generators/Python/Azure.Python/Templates/AzureLongRunningMethodTemplate.cshtml @@ -94,10 +94,11 @@ else @:return self._client.send(request, header_parameters, **operation_config) } @EmptyLine - def get_long_running_status(status_link, headers={}): + def get_long_running_status(status_link, headers=None): @EmptyLine request = self._client.get(status_link) - request.headers.update(headers) + if headers: + request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) @EmptyLine diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyArray/autorestswaggerbatarrayservice/operations/array.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyArray/autorestswaggerbatarrayservice/operations/array.py index 51e2f30f73..abed9ea1af 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyArray/autorestswaggerbatarrayservice/operations/array.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyArray/autorestswaggerbatarrayservice/operations/array.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null array value @@ -76,7 +76,7 @@ def get_null( return deserialized def get_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get invalid array [1, 2, 3 @@ -120,7 +120,7 @@ def get_invalid( return deserialized def get_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get empty array value [] @@ -164,7 +164,7 @@ def get_empty( return deserialized def put_empty( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set array value empty [] @@ -207,7 +207,7 @@ def put_empty( return client_raw_response def get_boolean_tfft( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get boolean array value [true, false, false, true] @@ -251,7 +251,7 @@ def get_boolean_tfft( return deserialized def put_boolean_tfft( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set array value empty [true, false, false, true] @@ -294,7 +294,7 @@ def put_boolean_tfft( return client_raw_response def get_boolean_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get boolean array value [true, null, false] @@ -338,7 +338,7 @@ def get_boolean_invalid_null( return deserialized def get_boolean_invalid_string( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get boolean array value [true, 'boolean', false] @@ -382,7 +382,7 @@ def get_boolean_invalid_string( return deserialized def get_integer_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get integer array value [1, -1, 3, 300] @@ -426,7 +426,7 @@ def get_integer_valid( return deserialized def put_integer_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set array value empty [1, -1, 3, 300] @@ -469,7 +469,7 @@ def put_integer_valid( return client_raw_response def get_int_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get integer array value [1, null, 0] @@ -513,7 +513,7 @@ def get_int_invalid_null( return deserialized def get_int_invalid_string( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get integer array value [1, 'integer', 0] @@ -557,7 +557,7 @@ def get_int_invalid_string( return deserialized def get_long_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get integer array value [1, -1, 3, 300] @@ -601,7 +601,7 @@ def get_long_valid( return deserialized def put_long_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set array value empty [1, -1, 3, 300] @@ -644,7 +644,7 @@ def put_long_valid( return client_raw_response def get_long_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get long array value [1, null, 0] @@ -688,7 +688,7 @@ def get_long_invalid_null( return deserialized def get_long_invalid_string( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get long array value [1, 'integer', 0] @@ -732,7 +732,7 @@ def get_long_invalid_string( return deserialized def get_float_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get float array value [0, -0.01, 1.2e20] @@ -776,7 +776,7 @@ def get_float_valid( return deserialized def put_float_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set array value [0, -0.01, 1.2e20] @@ -819,7 +819,7 @@ def put_float_valid( return client_raw_response def get_float_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get float array value [0.0, null, -1.2e20] @@ -863,7 +863,7 @@ def get_float_invalid_null( return deserialized def get_float_invalid_string( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get boolean array value [1.0, 'number', 0.0] @@ -907,7 +907,7 @@ def get_float_invalid_string( return deserialized def get_double_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get float array value [0, -0.01, 1.2e20] @@ -951,7 +951,7 @@ def get_double_valid( return deserialized def put_double_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set array value [0, -0.01, 1.2e20] @@ -994,7 +994,7 @@ def put_double_valid( return client_raw_response def get_double_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get float array value [0.0, null, -1.2e20] @@ -1038,7 +1038,7 @@ def get_double_invalid_null( return deserialized def get_double_invalid_string( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get boolean array value [1.0, 'number', 0.0] @@ -1082,7 +1082,7 @@ def get_double_invalid_string( return deserialized def get_string_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get string array value ['foo1', 'foo2', 'foo3'] @@ -1126,7 +1126,7 @@ def get_string_valid( return deserialized def put_string_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set array value ['foo1', 'foo2', 'foo3'] @@ -1169,7 +1169,7 @@ def put_string_valid( return client_raw_response def get_string_with_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get string array value ['foo', null, 'foo2'] @@ -1213,7 +1213,7 @@ def get_string_with_null( return deserialized def get_string_with_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get string array value ['foo', 123, 'foo2'] @@ -1257,7 +1257,7 @@ def get_string_with_invalid( return deserialized def get_uuid_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get uuid array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', @@ -1303,7 +1303,7 @@ def get_uuid_valid( return deserialized def put_uuid_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', @@ -1348,7 +1348,7 @@ def put_uuid_valid( return client_raw_response def get_uuid_invalid_chars( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get uuid array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'foo'] @@ -1392,7 +1392,7 @@ def get_uuid_invalid_chars( return deserialized def get_date_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get integer array value ['2000-12-01', '1980-01-02', '1492-10-12'] @@ -1436,7 +1436,7 @@ def get_date_valid( return deserialized def put_date_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set array value ['2000-12-01', '1980-01-02', '1492-10-12'] @@ -1479,7 +1479,7 @@ def put_date_valid( return client_raw_response def get_date_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get date array value ['2012-01-01', null, '1776-07-04'] @@ -1523,7 +1523,7 @@ def get_date_invalid_null( return deserialized def get_date_invalid_chars( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get date array value ['2011-03-22', 'date'] @@ -1567,7 +1567,7 @@ def get_date_invalid_chars( return deserialized def get_date_time_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get date-time array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', '1492-10-12T10:15:01-08:00'] @@ -1612,7 +1612,7 @@ def get_date_time_valid( return deserialized def put_date_time_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set array value ['2000-12-01t00:00:01z', '1980-01-02T00:11:35+01:00', '1492-10-12T10:15:01-08:00'] @@ -1656,7 +1656,7 @@ def put_date_time_valid( return client_raw_response def get_date_time_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get date array value ['2000-12-01t00:00:01z', null] @@ -1700,7 +1700,7 @@ def get_date_time_invalid_null( return deserialized def get_date_time_invalid_chars( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get date array value ['2000-12-01t00:00:01z', 'date-time'] @@ -1744,7 +1744,7 @@ def get_date_time_invalid_chars( return deserialized def get_date_time_rfc1123_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get date-time array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 Oct 1492 10:15:01 GMT'] @@ -1789,7 +1789,7 @@ def get_date_time_rfc1123_valid( return deserialized def put_date_time_rfc1123_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set array value ['Fri, 01 Dec 2000 00:00:01 GMT', 'Wed, 02 Jan 1980 00:11:35 GMT', 'Wed, 12 Oct 1492 10:15:01 GMT'] @@ -1833,7 +1833,7 @@ def put_date_time_rfc1123_valid( return client_raw_response def get_duration_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get duration array value ['P123DT22H14M12.011S', 'P5DT1H0M0S'] @@ -1877,7 +1877,7 @@ def get_duration_valid( return deserialized def put_duration_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set array value ['P123DT22H14M12.011S', 'P5DT1H0M0S'] @@ -1920,7 +1920,7 @@ def put_duration_valid( return client_raw_response def get_byte_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get byte array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each item encoded in base64 @@ -1965,7 +1965,7 @@ def get_byte_valid( return deserialized def put_byte_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Put the array value [hex(FF FF FF FA), hex(01 02 03), hex (25, 29, 43)] with each elementencoded in base 64 @@ -2009,7 +2009,7 @@ def put_byte_valid( return client_raw_response def get_byte_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get byte array value [hex(AB, AC, AD), null] with the first item base64 encoded @@ -2054,7 +2054,7 @@ def get_byte_invalid_null( return deserialized def get_base64_url( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get array value ['a string that gets encoded with base64url', 'test string' 'Lorem ipsum'] with the items base64url encoded @@ -2099,7 +2099,7 @@ def get_base64_url( return deserialized def get_complex_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get array of complex type null value @@ -2144,7 +2144,7 @@ def get_complex_null( return deserialized def get_complex_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get empty array of complex type [] @@ -2189,7 +2189,7 @@ def get_complex_empty( return deserialized def get_complex_item_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get array of complex type with null item [{'integer': 1 'string': '2'}, null, {'integer': 5, 'string': '6'}] @@ -2235,7 +2235,7 @@ def get_complex_item_null( return deserialized def get_complex_item_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get array of complex type with empty item [{'integer': 1 'string': '2'}, {}, {'integer': 5, 'string': '6'}] @@ -2281,7 +2281,7 @@ def get_complex_item_empty( return deserialized def get_complex_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get array of complex type with [{'integer': 1 'string': '2'}, {'integer': 3, 'string': '4'}, {'integer': 5, 'string': '6'}] @@ -2327,7 +2327,7 @@ def get_complex_valid( return deserialized def put_complex_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Put an array of complex type with values [{'integer': 1 'string': '2'}, {'integer': 3, 'string': '4'}, {'integer': 5, 'string': '6'}] @@ -2372,7 +2372,7 @@ def put_complex_valid( return client_raw_response def get_array_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get a null array @@ -2416,7 +2416,7 @@ def get_array_null( return deserialized def get_array_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an empty array [] @@ -2460,7 +2460,7 @@ def get_array_empty( return deserialized def get_array_item_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an array of array of strings [['1', '2', '3'], null, ['7', '8', '9']] @@ -2505,7 +2505,7 @@ def get_array_item_null( return deserialized def get_array_item_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an array of array of strings [['1', '2', '3'], [], ['7', '8', '9']] @@ -2549,7 +2549,7 @@ def get_array_item_empty( return deserialized def get_array_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']] @@ -2594,7 +2594,7 @@ def get_array_valid( return deserialized def put_array_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Put An array of array of strings [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']] @@ -2638,7 +2638,7 @@ def put_array_valid( return client_raw_response def get_dictionary_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an array of Dictionaries with value null @@ -2682,7 +2682,7 @@ def get_dictionary_null( return deserialized def get_dictionary_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an array of Dictionaries of type with value [] @@ -2726,7 +2726,7 @@ def get_dictionary_empty( return deserialized def get_dictionary_item_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': 'three'}, null, {'7': 'seven', '8': @@ -2772,7 +2772,7 @@ def get_dictionary_item_null( return deserialized def get_dictionary_item_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': 'three'}, {}, {'7': 'seven', '8': @@ -2818,7 +2818,7 @@ def get_dictionary_item_empty( return deserialized def get_dictionary_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': 'three'}, {'4': 'four', '5': 'five', @@ -2864,7 +2864,7 @@ def get_dictionary_valid( return deserialized def put_dictionary_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Get an array of Dictionaries of type with value [{'1': 'one', '2': 'two', '3': 'three'}, {'4': 'four', '5': 'five', diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyBoolean/autorestbooltestservice/operations/bool_model.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyBoolean/autorestbooltestservice/operations/bool_model.py index 0ec9dc24c7..7476481a89 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyBoolean/autorestbooltestservice/operations/bool_model.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyBoolean/autorestbooltestservice/operations/bool_model.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_true( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get true Boolean value @@ -76,7 +76,7 @@ def get_true( return deserialized def put_true( - self, bool_body, custom_headers={}, raw=False, **operation_config): + self, bool_body, custom_headers=None, raw=False, **operation_config): """ Set Boolean value true @@ -119,7 +119,7 @@ def put_true( return client_raw_response def get_false( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get false Boolean value @@ -163,7 +163,7 @@ def get_false( return deserialized def put_false( - self, bool_body, custom_headers={}, raw=False, **operation_config): + self, bool_body, custom_headers=None, raw=False, **operation_config): """ Set Boolean value false @@ -206,7 +206,7 @@ def put_false( return client_raw_response def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null Boolean value @@ -250,7 +250,7 @@ def get_null( return deserialized def get_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get invalid Boolean value diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyByte/autorestswaggerbatbyteservice/operations/byte.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyByte/autorestswaggerbatbyteservice/operations/byte.py index f879f85351..4c61611729 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyByte/autorestswaggerbatbyteservice/operations/byte.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyByte/autorestswaggerbatbyteservice/operations/byte.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null byte value @@ -76,7 +76,7 @@ def get_null( return deserialized def get_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get empty byte value '' @@ -120,7 +120,7 @@ def get_empty( return deserialized def get_non_ascii( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get non-ascii byte string hex(FF FE FD FC FB FA F9 F8 F7 F6) @@ -164,7 +164,7 @@ def get_non_ascii( return deserialized def put_non_ascii( - self, byte_body, custom_headers={}, raw=False, **operation_config): + self, byte_body, custom_headers=None, raw=False, **operation_config): """ Put non-ascii byte string hex(FF FE FD FC FB FA F9 F8 F7 F6) @@ -208,7 +208,7 @@ def put_non_ascii( return client_raw_response def get_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get invalid byte value ':::SWAGGER::::' diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/array.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/array.py index e375d28d5b..3fb6eec8be 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/array.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/array.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with array property @@ -77,7 +77,7 @@ def get_valid( return deserialized def put_valid( - self, array=None, custom_headers={}, raw=False, **operation_config): + self, array=None, custom_headers=None, raw=False, **operation_config): """ Put complex types with array property @@ -122,7 +122,7 @@ def put_valid( return client_raw_response def get_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with array property which is empty @@ -167,7 +167,7 @@ def get_empty( return deserialized def put_empty( - self, array=None, custom_headers={}, raw=False, **operation_config): + self, array=None, custom_headers=None, raw=False, **operation_config): """ Put complex types with array property which is empty @@ -212,7 +212,7 @@ def put_empty( return client_raw_response def get_not_provided( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with array property while server doesn't provide a response payload diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/basic_operations.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/basic_operations.py index f1cf4be957..d66a86b411 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/basic_operations.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/basic_operations.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex type {id: 2, name: 'abc', color: 'YELLOW'} @@ -77,7 +77,7 @@ def get_valid( return deserialized def put_valid( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Please put {id: 2, name: 'abc', color: 'Magenta'} @@ -122,7 +122,7 @@ def put_valid( return client_raw_response def get_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get a basic complex type that is invalid for the local strong type @@ -167,7 +167,7 @@ def get_invalid( return deserialized def get_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get a basic complex type that is empty @@ -212,7 +212,7 @@ def get_empty( return deserialized def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get a basic complex type whose properties are null @@ -257,7 +257,7 @@ def get_null( return deserialized def get_not_provided( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get a basic complex type while the server doesn't provide a response payload diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/dictionary.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/dictionary.py index c99f68238a..cc07b65e49 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/dictionary.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/dictionary.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with dictionary property @@ -77,7 +77,7 @@ def get_valid( return deserialized def put_valid( - self, default_program=None, custom_headers={}, raw=False, **operation_config): + self, default_program=None, custom_headers=None, raw=False, **operation_config): """ Put complex types with dictionary property @@ -122,7 +122,7 @@ def put_valid( return client_raw_response def get_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with dictionary property which is empty @@ -167,7 +167,7 @@ def get_empty( return deserialized def put_empty( - self, default_program=None, custom_headers={}, raw=False, **operation_config): + self, default_program=None, custom_headers=None, raw=False, **operation_config): """ Put complex types with dictionary property which is empty @@ -212,7 +212,7 @@ def put_empty( return client_raw_response def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with dictionary property which is null @@ -257,7 +257,7 @@ def get_null( return deserialized def get_not_provided( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with dictionary property while server doesn't provide a response payload diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/inheritance.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/inheritance.py index 94062da6c3..37bf308be2 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/inheritance.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/inheritance.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types that extend others @@ -77,7 +77,7 @@ def get_valid( return deserialized def put_valid( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types that extend others diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphicrecursive.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphicrecursive.py index d2aadc47ad..451955b6fe 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphicrecursive.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphicrecursive.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types that are polymorphic and have recursive references @@ -77,7 +77,7 @@ def get_valid( return deserialized def put_valid( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types that are polymorphic and have recursive references diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphism.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphism.py index 3b3d75f90d..e85c471abf 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphism.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphism.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types that are polymorphic @@ -77,7 +77,7 @@ def get_valid( return deserialized def put_valid( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types that are polymorphic @@ -154,7 +154,7 @@ def put_valid( return client_raw_response def put_valid_missing_required( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types that are polymorphic, attempting to omit required 'birthday' field - the request should not be allowed from the client diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/primitive.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/primitive.py index de0386c4de..ca9e56f8d0 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/primitive.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/primitive.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_int( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with integer properties @@ -77,7 +77,7 @@ def get_int( return deserialized def put_int( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types with integer properties @@ -121,7 +121,7 @@ def put_int( return client_raw_response def get_long( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with long properties @@ -166,7 +166,7 @@ def get_long( return deserialized def put_long( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types with long properties @@ -210,7 +210,7 @@ def put_long( return client_raw_response def get_float( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with float properties @@ -255,7 +255,7 @@ def get_float( return deserialized def put_float( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types with float properties @@ -299,7 +299,7 @@ def put_float( return client_raw_response def get_double( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with double properties @@ -344,7 +344,7 @@ def get_double( return deserialized def put_double( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types with double properties @@ -389,7 +389,7 @@ def put_double( return client_raw_response def get_bool( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with bool properties @@ -434,7 +434,7 @@ def get_bool( return deserialized def put_bool( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types with bool properties @@ -478,7 +478,7 @@ def put_bool( return client_raw_response def get_string( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with string properties @@ -523,7 +523,7 @@ def get_string( return deserialized def put_string( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types with string properties @@ -567,7 +567,7 @@ def put_string( return client_raw_response def get_date( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with date properties @@ -612,7 +612,7 @@ def get_date( return deserialized def put_date( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types with date properties @@ -656,7 +656,7 @@ def put_date( return client_raw_response def get_date_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with datetime properties @@ -701,7 +701,7 @@ def get_date_time( return deserialized def put_date_time( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types with datetime properties @@ -746,7 +746,7 @@ def put_date_time( return client_raw_response def get_date_time_rfc1123( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with datetimeRfc1123 properties @@ -791,7 +791,7 @@ def get_date_time_rfc1123( return deserialized def put_date_time_rfc1123( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types with datetimeRfc1123 properties @@ -836,7 +836,7 @@ def put_date_time_rfc1123( return client_raw_response def get_duration( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with duration properties @@ -881,7 +881,7 @@ def get_duration( return deserialized def put_duration( - self, field=None, custom_headers={}, raw=False, **operation_config): + self, field=None, custom_headers=None, raw=False, **operation_config): """ Put complex types with duration properties @@ -926,7 +926,7 @@ def put_duration( return client_raw_response def get_byte( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types with byte properties @@ -971,7 +971,7 @@ def get_byte( return deserialized def put_byte( - self, field=None, custom_headers={}, raw=False, **operation_config): + self, field=None, custom_headers=None, raw=False, **operation_config): """ Put complex types with byte properties diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/readonlyproperty.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/readonlyproperty.py index fde563ffc3..d8505c972d 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/readonlyproperty.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/readonlyproperty.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get complex types that have readonly properties @@ -77,7 +77,7 @@ def get_valid( return deserialized def put_valid( - self, complex_body, custom_headers={}, raw=False, **operation_config): + self, complex_body, custom_headers=None, raw=False, **operation_config): """ Put complex types that have readonly properties diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDate/autorestdatetestservice/operations/date_model.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDate/autorestdatetestservice/operations/date_model.py index c0b1f47c71..4f0f9e778d 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDate/autorestdatetestservice/operations/date_model.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDate/autorestdatetestservice/operations/date_model.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null date value @@ -76,7 +76,7 @@ def get_null( return deserialized def get_invalid_date( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get invalid date value @@ -120,7 +120,7 @@ def get_invalid_date( return deserialized def get_overflow_date( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get overflow date value @@ -164,7 +164,7 @@ def get_overflow_date( return deserialized def get_underflow_date( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get underflow date value @@ -208,7 +208,7 @@ def get_underflow_date( return deserialized def put_max_date( - self, date_body, custom_headers={}, raw=False, **operation_config): + self, date_body, custom_headers=None, raw=False, **operation_config): """ Put max date value 9999-12-31 @@ -251,7 +251,7 @@ def put_max_date( return client_raw_response def get_max_date( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get max date value 9999-12-31 @@ -295,7 +295,7 @@ def get_max_date( return deserialized def put_min_date( - self, date_body, custom_headers={}, raw=False, **operation_config): + self, date_body, custom_headers=None, raw=False, **operation_config): """ Put min date value 0000-01-01 @@ -338,7 +338,7 @@ def put_min_date( return client_raw_response def get_min_date( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get min date value 0000-01-01 diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTime/autorestdatetimetestservice/operations/datetime_model.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTime/autorestdatetimetestservice/operations/datetime_model.py index 36fe8312b4..b4412d87ef 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTime/autorestdatetimetestservice/operations/datetime_model.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTime/autorestdatetimetestservice/operations/datetime_model.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null datetime value @@ -76,7 +76,7 @@ def get_null( return deserialized def get_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get invalid datetime value @@ -120,7 +120,7 @@ def get_invalid( return deserialized def get_overflow( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get overflow datetime value @@ -164,7 +164,7 @@ def get_overflow( return deserialized def get_underflow( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get underflow datetime value @@ -208,7 +208,7 @@ def get_underflow( return deserialized def put_utc_max_date_time( - self, datetime_body, custom_headers={}, raw=False, **operation_config): + self, datetime_body, custom_headers=None, raw=False, **operation_config): """ Put max datetime value 9999-12-31T23:59:59.9999999Z @@ -251,7 +251,7 @@ def put_utc_max_date_time( return client_raw_response def get_utc_lowercase_max_date_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get max datetime value 9999-12-31t23:59:59.9999999z @@ -295,7 +295,7 @@ def get_utc_lowercase_max_date_time( return deserialized def get_utc_uppercase_max_date_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get max datetime value 9999-12-31T23:59:59.9999999Z @@ -339,7 +339,7 @@ def get_utc_uppercase_max_date_time( return deserialized def put_local_positive_offset_max_date_time( - self, datetime_body, custom_headers={}, raw=False, **operation_config): + self, datetime_body, custom_headers=None, raw=False, **operation_config): """ Put max datetime value with positive numoffset 9999-12-31t23:59:59.9999999+14:00 @@ -383,7 +383,7 @@ def put_local_positive_offset_max_date_time( return client_raw_response def get_local_positive_offset_lowercase_max_date_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get max datetime value with positive num offset 9999-12-31t23:59:59.9999999+14:00 @@ -428,7 +428,7 @@ def get_local_positive_offset_lowercase_max_date_time( return deserialized def get_local_positive_offset_uppercase_max_date_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get max datetime value with positive num offset 9999-12-31T23:59:59.9999999+14:00 @@ -473,7 +473,7 @@ def get_local_positive_offset_uppercase_max_date_time( return deserialized def put_local_negative_offset_max_date_time( - self, datetime_body, custom_headers={}, raw=False, **operation_config): + self, datetime_body, custom_headers=None, raw=False, **operation_config): """ Put max datetime value with positive numoffset 9999-12-31t23:59:59.9999999-14:00 @@ -517,7 +517,7 @@ def put_local_negative_offset_max_date_time( return client_raw_response def get_local_negative_offset_uppercase_max_date_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get max datetime value with positive num offset 9999-12-31T23:59:59.9999999-14:00 @@ -562,7 +562,7 @@ def get_local_negative_offset_uppercase_max_date_time( return deserialized def get_local_negative_offset_lowercase_max_date_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get max datetime value with positive num offset 9999-12-31t23:59:59.9999999-14:00 @@ -607,7 +607,7 @@ def get_local_negative_offset_lowercase_max_date_time( return deserialized def put_utc_min_date_time( - self, datetime_body, custom_headers={}, raw=False, **operation_config): + self, datetime_body, custom_headers=None, raw=False, **operation_config): """ Put min datetime value 0001-01-01T00:00:00Z @@ -650,7 +650,7 @@ def put_utc_min_date_time( return client_raw_response def get_utc_min_date_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get min datetime value 0001-01-01T00:00:00Z @@ -694,7 +694,7 @@ def get_utc_min_date_time( return deserialized def put_local_positive_offset_min_date_time( - self, datetime_body, custom_headers={}, raw=False, **operation_config): + self, datetime_body, custom_headers=None, raw=False, **operation_config): """ Put min datetime value 0001-01-01T00:00:00+14:00 @@ -737,7 +737,7 @@ def put_local_positive_offset_min_date_time( return client_raw_response def get_local_positive_offset_min_date_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get min datetime value 0001-01-01T00:00:00+14:00 @@ -781,7 +781,7 @@ def get_local_positive_offset_min_date_time( return deserialized def put_local_negative_offset_min_date_time( - self, datetime_body, custom_headers={}, raw=False, **operation_config): + self, datetime_body, custom_headers=None, raw=False, **operation_config): """ Put min datetime value 0001-01-01T00:00:00-14:00 @@ -824,7 +824,7 @@ def put_local_negative_offset_min_date_time( return client_raw_response def get_local_negative_offset_min_date_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get min datetime value 0001-01-01T00:00:00-14:00 diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/autorestrfc1123datetimetestservice/operations/datetimerfc1123.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/autorestrfc1123datetimetestservice/operations/datetimerfc1123.py index 679bb0be6b..1d9e03f214 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/autorestrfc1123datetimetestservice/operations/datetimerfc1123.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/autorestrfc1123datetimetestservice/operations/datetimerfc1123.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null datetime value @@ -76,7 +76,7 @@ def get_null( return deserialized def get_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get invalid datetime value @@ -120,7 +120,7 @@ def get_invalid( return deserialized def get_overflow( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get overflow datetime value @@ -164,7 +164,7 @@ def get_overflow( return deserialized def get_underflow( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get underflow datetime value @@ -208,7 +208,7 @@ def get_underflow( return deserialized def put_utc_max_date_time( - self, datetime_body, custom_headers={}, raw=False, **operation_config): + self, datetime_body, custom_headers=None, raw=False, **operation_config): """ Put max datetime value Fri, 31 Dec 9999 23:59:59 GMT @@ -251,7 +251,7 @@ def put_utc_max_date_time( return client_raw_response def get_utc_lowercase_max_date_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get max datetime value fri, 31 dec 9999 23:59:59 gmt @@ -295,7 +295,7 @@ def get_utc_lowercase_max_date_time( return deserialized def get_utc_uppercase_max_date_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get max datetime value FRI, 31 DEC 9999 23:59:59 GMT @@ -339,7 +339,7 @@ def get_utc_uppercase_max_date_time( return deserialized def put_utc_min_date_time( - self, datetime_body, custom_headers={}, raw=False, **operation_config): + self, datetime_body, custom_headers=None, raw=False, **operation_config): """ Put min datetime value Mon, 1 Jan 0001 00:00:00 GMT @@ -382,7 +382,7 @@ def put_utc_min_date_time( return client_raw_response def get_utc_min_date_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get min datetime value Mon, 1 Jan 0001 00:00:00 GMT diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDictionary/autorestswaggerbatdictionaryservice/operations/dictionary.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDictionary/autorestswaggerbatdictionaryservice/operations/dictionary.py index ef93fea23f..5744c23adf 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDictionary/autorestswaggerbatdictionaryservice/operations/dictionary.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDictionary/autorestswaggerbatdictionaryservice/operations/dictionary.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null dictionary value @@ -76,7 +76,7 @@ def get_null( return deserialized def get_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get empty dictionary value {} @@ -120,7 +120,7 @@ def get_empty( return deserialized def put_empty( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set dictionary value empty {} @@ -163,7 +163,7 @@ def put_empty( return client_raw_response def get_null_value( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get Dictionary with null value @@ -207,7 +207,7 @@ def get_null_value( return deserialized def get_null_key( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get Dictionary with null key @@ -251,7 +251,7 @@ def get_null_key( return deserialized def get_empty_string_key( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get Dictionary with key as empty string @@ -295,7 +295,7 @@ def get_empty_string_key( return deserialized def get_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get invalid Dictionary value @@ -339,7 +339,7 @@ def get_invalid( return deserialized def get_boolean_tfft( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get boolean dictionary value {"0": true, "1": false, "2": false, "3": true } @@ -384,7 +384,7 @@ def get_boolean_tfft( return deserialized def put_boolean_tfft( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set dictionary value empty {"0": true, "1": false, "2": false, "3": true } @@ -428,7 +428,7 @@ def put_boolean_tfft( return client_raw_response def get_boolean_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get boolean dictionary value {"0": true, "1": null, "2": false } @@ -472,7 +472,7 @@ def get_boolean_invalid_null( return deserialized def get_boolean_invalid_string( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get boolean dictionary value '{"0": true, "1": "boolean", "2": false}' @@ -516,7 +516,7 @@ def get_boolean_invalid_string( return deserialized def get_integer_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get integer dictionary value {"0": 1, "1": -1, "2": 3, "3": 300} @@ -560,7 +560,7 @@ def get_integer_valid( return deserialized def put_integer_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300} @@ -603,7 +603,7 @@ def put_integer_valid( return client_raw_response def get_int_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get integer dictionary value {"0": 1, "1": null, "2": 0} @@ -647,7 +647,7 @@ def get_int_invalid_null( return deserialized def get_int_invalid_string( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get integer dictionary value {"0": 1, "1": "integer", "2": 0} @@ -691,7 +691,7 @@ def get_int_invalid_string( return deserialized def get_long_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get integer dictionary value {"0": 1, "1": -1, "2": 3, "3": 300} @@ -735,7 +735,7 @@ def get_long_valid( return deserialized def put_long_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set dictionary value empty {"0": 1, "1": -1, "2": 3, "3": 300} @@ -778,7 +778,7 @@ def put_long_valid( return client_raw_response def get_long_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get long dictionary value {"0": 1, "1": null, "2": 0} @@ -822,7 +822,7 @@ def get_long_invalid_null( return deserialized def get_long_invalid_string( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get long dictionary value {"0": 1, "1": "integer", "2": 0} @@ -866,7 +866,7 @@ def get_long_invalid_string( return deserialized def get_float_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get float dictionary value {"0": 0, "1": -0.01, "2": 1.2e20} @@ -910,7 +910,7 @@ def get_float_valid( return deserialized def put_float_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20} @@ -953,7 +953,7 @@ def put_float_valid( return client_raw_response def get_float_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get float dictionary value {"0": 0.0, "1": null, "2": 1.2e20} @@ -997,7 +997,7 @@ def get_float_invalid_null( return deserialized def get_float_invalid_string( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get boolean dictionary value {"0": 1.0, "1": "number", "2": 0.0} @@ -1041,7 +1041,7 @@ def get_float_invalid_string( return deserialized def get_double_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get float dictionary value {"0": 0, "1": -0.01, "2": 1.2e20} @@ -1085,7 +1085,7 @@ def get_double_valid( return deserialized def put_double_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20} @@ -1128,7 +1128,7 @@ def put_double_valid( return client_raw_response def get_double_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get float dictionary value {"0": 0.0, "1": null, "2": 1.2e20} @@ -1172,7 +1172,7 @@ def get_double_invalid_null( return deserialized def get_double_invalid_string( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get boolean dictionary value {"0": 1.0, "1": "number", "2": 0.0} @@ -1216,7 +1216,7 @@ def get_double_invalid_string( return deserialized def get_string_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get string dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"} @@ -1260,7 +1260,7 @@ def get_string_valid( return deserialized def put_string_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set dictionary value {"0": "foo1", "1": "foo2", "2": "foo3"} @@ -1303,7 +1303,7 @@ def put_string_valid( return client_raw_response def get_string_with_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get string dictionary value {"0": "foo", "1": null, "2": "foo2"} @@ -1347,7 +1347,7 @@ def get_string_with_null( return deserialized def get_string_with_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get string dictionary value {"0": "foo", "1": 123, "2": "foo2"} @@ -1391,7 +1391,7 @@ def get_string_with_invalid( return deserialized def get_date_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get integer dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"} @@ -1436,7 +1436,7 @@ def get_date_valid( return deserialized def put_date_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"} @@ -1480,7 +1480,7 @@ def put_date_valid( return client_raw_response def get_date_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get date dictionary value {"0": "2012-01-01", "1": null, "2": "1776-07-04"} @@ -1525,7 +1525,7 @@ def get_date_invalid_null( return deserialized def get_date_invalid_chars( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get date dictionary value {"0": "2011-03-22", "1": "date"} @@ -1569,7 +1569,7 @@ def get_date_invalid_chars( return deserialized def get_date_time_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get date-time dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": "1492-10-12T10:15:01-08:00"} @@ -1614,7 +1614,7 @@ def get_date_time_valid( return deserialized def put_date_time_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": "1492-10-12T10:15:01-08:00"} @@ -1658,7 +1658,7 @@ def put_date_time_valid( return client_raw_response def get_date_time_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get date dictionary value {"0": "2000-12-01t00:00:01z", "1": null} @@ -1702,7 +1702,7 @@ def get_date_time_invalid_null( return deserialized def get_date_time_invalid_chars( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get date dictionary value {"0": "2000-12-01t00:00:01z", "1": "date-time"} @@ -1747,7 +1747,7 @@ def get_date_time_invalid_chars( return deserialized def get_date_time_rfc1123_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get date-time-rfc1123 dictionary value {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 00:11:35 GMT", "2": "Wed, 12 @@ -1793,7 +1793,7 @@ def get_date_time_rfc1123_valid( return deserialized def put_date_time_rfc1123_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 00:11:35 GMT", "2": "Wed, 12 Oct 1492 10:15:01 GMT"} @@ -1837,7 +1837,7 @@ def put_date_time_rfc1123_valid( return client_raw_response def get_duration_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get duration dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"} @@ -1882,7 +1882,7 @@ def get_duration_valid( return deserialized def put_duration_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"} @@ -1925,7 +1925,7 @@ def put_duration_valid( return client_raw_response def get_byte_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get byte dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} with each item encoded in base64 @@ -1970,7 +1970,7 @@ def get_byte_valid( return deserialized def put_byte_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Put the dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} with each elementencoded in base 64 @@ -2014,7 +2014,7 @@ def put_byte_valid( return client_raw_response def get_byte_invalid_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get byte dictionary value {"0": hex(FF FF FF FA), "1": null} with the first item base64 encoded @@ -2059,7 +2059,7 @@ def get_byte_invalid_null( return deserialized def get_base64_url( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get base64url dictionary value {"0": "a string that gets encoded with base64url", "1": "test string", "2": "Lorem ipsum"} @@ -2104,7 +2104,7 @@ def get_base64_url( return deserialized def get_complex_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get dictionary of complex type null value @@ -2148,7 +2148,7 @@ def get_complex_null( return deserialized def get_complex_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get empty dictionary of complex type {} @@ -2192,7 +2192,7 @@ def get_complex_empty( return deserialized def get_complex_item_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get dictionary of complex type with null item {"0": {"integer": 1, "string": "2"}, "1": null, "2": {"integer": 5, "string": "6"}} @@ -2237,7 +2237,7 @@ def get_complex_item_null( return deserialized def get_complex_item_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get dictionary of complex type with empty item {"0": {"integer": 1, "string": "2"}, "1:" {}, "2": {"integer": 5, "string": "6"}} @@ -2282,7 +2282,7 @@ def get_complex_item_empty( return deserialized def get_complex_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get dictionary of complex type with {"0": {"integer": 1, "string": "2"}, "1": {"integer": 3, "string": "4"}, "2": {"integer": 5, @@ -2328,7 +2328,7 @@ def get_complex_valid( return deserialized def put_complex_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Put an dictionary of complex type with values {"0": {"integer": 1, "string": "2"}, "1": {"integer": 3, "string": "4"}, "2": {"integer": @@ -2373,7 +2373,7 @@ def put_complex_valid( return client_raw_response def get_array_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get a null array @@ -2417,7 +2417,7 @@ def get_array_null( return deserialized def get_array_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an empty dictionary {} @@ -2461,7 +2461,7 @@ def get_array_empty( return deserialized def get_array_item_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an dictionary of array of strings {"0": ["1", "2", "3"], "1": null, "2": ["7", "8", "9"]} @@ -2506,7 +2506,7 @@ def get_array_item_null( return deserialized def get_array_item_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an array of array of strings [{"0": ["1", "2", "3"], "1": [], "2": ["7", "8", "9"]} @@ -2551,7 +2551,7 @@ def get_array_item_empty( return deserialized def get_array_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an array of array of strings {"0": ["1", "2", "3"], "1": ["4", "5", "6"], "2": ["7", "8", "9"]} @@ -2596,7 +2596,7 @@ def get_array_valid( return deserialized def put_array_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Put An array of array of strings {"0": ["1", "2", "3"], "1": ["4", "5", "6"], "2": ["7", "8", "9"]} @@ -2640,7 +2640,7 @@ def put_array_valid( return client_raw_response def get_dictionary_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an dictionaries of dictionaries with value null @@ -2684,7 +2684,7 @@ def get_dictionary_null( return deserialized def get_dictionary_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an dictionaries of dictionaries of type with value {} @@ -2729,7 +2729,7 @@ def get_dictionary_empty( return deserialized def get_dictionary_item_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": "two", "3": "three"}, "1": null, "2": @@ -2775,7 +2775,7 @@ def get_dictionary_item_null( return deserialized def get_dictionary_item_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": "two", "3": "three"}, "1": {}, "2": @@ -2821,7 +2821,7 @@ def get_dictionary_item_empty( return deserialized def get_dictionary_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": "two", "3": "three"}, "1": {"4": @@ -2868,7 +2868,7 @@ def get_dictionary_valid( return deserialized def put_dictionary_valid( - self, array_body, custom_headers={}, raw=False, **operation_config): + self, array_body, custom_headers=None, raw=False, **operation_config): """ Get an dictionaries of dictionaries of type with value {"0": {"1": "one", "2": "two", "3": "three"}, "1": {"4": diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDuration/autorestdurationtestservice/operations/duration.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDuration/autorestdurationtestservice/operations/duration.py index d99043d42d..1bf3b5a416 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDuration/autorestdurationtestservice/operations/duration.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDuration/autorestdurationtestservice/operations/duration.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null duration value @@ -76,7 +76,7 @@ def get_null( return deserialized def put_positive_duration( - self, duration_body, custom_headers={}, raw=False, **operation_config): + self, duration_body, custom_headers=None, raw=False, **operation_config): """ Put a positive duration value @@ -119,7 +119,7 @@ def put_positive_duration( return client_raw_response def get_positive_duration( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get a positive duration value @@ -163,7 +163,7 @@ def get_positive_duration( return deserialized def get_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get an invalid duration value diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFile/autorestswaggerbatfileservice/operations/files.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFile/autorestswaggerbatfileservice/operations/files.py index d471df199e..82b953c456 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFile/autorestswaggerbatfileservice/operations/files.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFile/autorestswaggerbatfileservice/operations/files.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_file( - self, custom_headers={}, raw=False, callback=None, **operation_config): + self, custom_headers=None, raw=False, callback=None, **operation_config): """ Get file @@ -81,7 +81,7 @@ def get_file( return deserialized def get_file_large( - self, custom_headers={}, raw=False, callback=None, **operation_config): + self, custom_headers=None, raw=False, callback=None, **operation_config): """ Get a large file @@ -130,7 +130,7 @@ def get_file_large( return deserialized def get_empty_file( - self, custom_headers={}, raw=False, callback=None, **operation_config): + self, custom_headers=None, raw=False, callback=None, **operation_config): """ Get empty file diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFormData/autorestswaggerbatformdataservice/operations/formdata.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFormData/autorestswaggerbatformdataservice/operations/formdata.py index ed3621ac98..99b61bb72e 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFormData/autorestswaggerbatformdataservice/operations/formdata.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFormData/autorestswaggerbatformdataservice/operations/formdata.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def upload_file( - self, file_content, file_name, custom_headers={}, raw=False, callback=None, **operation_config): + self, file_content, file_name, custom_headers=None, raw=False, callback=None, **operation_config): """ Upload file @@ -93,7 +93,7 @@ def upload_file( return deserialized def upload_file_via_body( - self, file_content, custom_headers={}, raw=False, callback=None, **operation_config): + self, file_content, custom_headers=None, raw=False, callback=None, **operation_config): """ Upload file diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyInteger/autorestintegertestservice/operations/int_model.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyInteger/autorestintegertestservice/operations/int_model.py index 8474f7d5cd..a0140cff75 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyInteger/autorestintegertestservice/operations/int_model.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyInteger/autorestintegertestservice/operations/int_model.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null Int value @@ -76,7 +76,7 @@ def get_null( return deserialized def get_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get invalid Int value @@ -120,7 +120,7 @@ def get_invalid( return deserialized def get_overflow_int32( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get overflow Int32 value @@ -164,7 +164,7 @@ def get_overflow_int32( return deserialized def get_underflow_int32( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get underflow Int32 value @@ -208,7 +208,7 @@ def get_underflow_int32( return deserialized def get_overflow_int64( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get overflow Int64 value @@ -252,7 +252,7 @@ def get_overflow_int64( return deserialized def get_underflow_int64( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get underflow Int64 value @@ -296,7 +296,7 @@ def get_underflow_int64( return deserialized def put_max32( - self, int_body, custom_headers={}, raw=False, **operation_config): + self, int_body, custom_headers=None, raw=False, **operation_config): """ Put max int32 value @@ -339,7 +339,7 @@ def put_max32( return client_raw_response def put_max64( - self, int_body, custom_headers={}, raw=False, **operation_config): + self, int_body, custom_headers=None, raw=False, **operation_config): """ Put max int64 value @@ -382,7 +382,7 @@ def put_max64( return client_raw_response def put_min32( - self, int_body, custom_headers={}, raw=False, **operation_config): + self, int_body, custom_headers=None, raw=False, **operation_config): """ Put min int32 value @@ -425,7 +425,7 @@ def put_min32( return client_raw_response def put_min64( - self, int_body, custom_headers={}, raw=False, **operation_config): + self, int_body, custom_headers=None, raw=False, **operation_config): """ Put min int64 value @@ -468,7 +468,7 @@ def put_min64( return client_raw_response def get_unix_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get datetime encoded as Unix time value @@ -512,7 +512,7 @@ def get_unix_time( return deserialized def put_unix_time_date( - self, int_body, custom_headers={}, raw=False, **operation_config): + self, int_body, custom_headers=None, raw=False, **operation_config): """ Put datetime encoded as Unix time @@ -555,7 +555,7 @@ def put_unix_time_date( return client_raw_response def get_invalid_unix_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get invalid Unix time value @@ -599,7 +599,7 @@ def get_invalid_unix_time( return deserialized def get_null_unix_time( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null Unix time value diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyNumber/autorestnumbertestservice/operations/number.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyNumber/autorestnumbertestservice/operations/number.py index bfc4e6c78c..407caf3075 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyNumber/autorestnumbertestservice/operations/number.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyNumber/autorestnumbertestservice/operations/number.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null Number value @@ -76,7 +76,7 @@ def get_null( return deserialized def get_invalid_float( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get invalid float Number value @@ -120,7 +120,7 @@ def get_invalid_float( return deserialized def get_invalid_double( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get invalid double Number value @@ -164,7 +164,7 @@ def get_invalid_double( return deserialized def get_invalid_decimal( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get invalid decimal Number value @@ -208,7 +208,7 @@ def get_invalid_decimal( return deserialized def put_big_float( - self, number_body, custom_headers={}, raw=False, **operation_config): + self, number_body, custom_headers=None, raw=False, **operation_config): """ Put big float value 3.402823e+20 @@ -251,7 +251,7 @@ def put_big_float( return client_raw_response def get_big_float( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get big float value 3.402823e+20 @@ -295,7 +295,7 @@ def get_big_float( return deserialized def put_big_double( - self, number_body, custom_headers={}, raw=False, **operation_config): + self, number_body, custom_headers=None, raw=False, **operation_config): """ Put big double value 2.5976931e+101 @@ -338,7 +338,7 @@ def put_big_double( return client_raw_response def get_big_double( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get big double value 2.5976931e+101 @@ -382,7 +382,7 @@ def get_big_double( return deserialized def put_big_double_positive_decimal( - self, number_body, custom_headers={}, raw=False, **operation_config): + self, number_body, custom_headers=None, raw=False, **operation_config): """ Put big double value 99999999.99 @@ -425,7 +425,7 @@ def put_big_double_positive_decimal( return client_raw_response def get_big_double_positive_decimal( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get big double value 99999999.99 @@ -469,7 +469,7 @@ def get_big_double_positive_decimal( return deserialized def put_big_double_negative_decimal( - self, number_body, custom_headers={}, raw=False, **operation_config): + self, number_body, custom_headers=None, raw=False, **operation_config): """ Put big double value -99999999.99 @@ -512,7 +512,7 @@ def put_big_double_negative_decimal( return client_raw_response def get_big_double_negative_decimal( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get big double value -99999999.99 @@ -556,7 +556,7 @@ def get_big_double_negative_decimal( return deserialized def put_big_decimal( - self, number_body, custom_headers={}, raw=False, **operation_config): + self, number_body, custom_headers=None, raw=False, **operation_config): """ Put big decimal value 2.5976931e+101 @@ -599,7 +599,7 @@ def put_big_decimal( return client_raw_response def get_big_decimal( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get big decimal value 2.5976931e+101 @@ -643,7 +643,7 @@ def get_big_decimal( return deserialized def put_big_decimal_positive_decimal( - self, number_body, custom_headers={}, raw=False, **operation_config): + self, number_body, custom_headers=None, raw=False, **operation_config): """ Put big decimal value 99999999.99 @@ -686,7 +686,7 @@ def put_big_decimal_positive_decimal( return client_raw_response def get_big_decimal_positive_decimal( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get big decimal value 99999999.99 @@ -730,7 +730,7 @@ def get_big_decimal_positive_decimal( return deserialized def put_big_decimal_negative_decimal( - self, number_body, custom_headers={}, raw=False, **operation_config): + self, number_body, custom_headers=None, raw=False, **operation_config): """ Put big decimal value -99999999.99 @@ -773,7 +773,7 @@ def put_big_decimal_negative_decimal( return client_raw_response def get_big_decimal_negative_decimal( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get big decimal value -99999999.99 @@ -817,7 +817,7 @@ def get_big_decimal_negative_decimal( return deserialized def put_small_float( - self, number_body, custom_headers={}, raw=False, **operation_config): + self, number_body, custom_headers=None, raw=False, **operation_config): """ Put small float value 3.402823e-20 @@ -860,7 +860,7 @@ def put_small_float( return client_raw_response def get_small_float( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get big double value 3.402823e-20 @@ -904,7 +904,7 @@ def get_small_float( return deserialized def put_small_double( - self, number_body, custom_headers={}, raw=False, **operation_config): + self, number_body, custom_headers=None, raw=False, **operation_config): """ Put small double value 2.5976931e-101 @@ -947,7 +947,7 @@ def put_small_double( return client_raw_response def get_small_double( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get big double value 2.5976931e-101 @@ -991,7 +991,7 @@ def get_small_double( return deserialized def put_small_decimal( - self, number_body, custom_headers={}, raw=False, **operation_config): + self, number_body, custom_headers=None, raw=False, **operation_config): """ Put small decimal value 2.5976931e-101 @@ -1034,7 +1034,7 @@ def put_small_decimal( return client_raw_response def get_small_decimal( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get small decimal value 2.5976931e-101 diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyString/autorestswaggerbatservice/operations/enum.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyString/autorestswaggerbatservice/operations/enum.py index 18169ce12b..9880ab28e0 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyString/autorestswaggerbatservice/operations/enum.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyString/autorestswaggerbatservice/operations/enum.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_not_expandable( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get enum value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'. @@ -77,7 +77,7 @@ def get_not_expandable( return deserialized def put_not_expandable( - self, string_body, custom_headers={}, raw=False, **operation_config): + self, string_body, custom_headers=None, raw=False, **operation_config): """ Sends value 'red color' from enumeration of 'red color', 'green-color', 'blue_color' diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyString/autorestswaggerbatservice/operations/string.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyString/autorestswaggerbatservice/operations/string.py index c6a765bba2..09a9762763 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyString/autorestswaggerbatservice/operations/string.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyString/autorestswaggerbatservice/operations/string.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_null( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null string value value @@ -76,7 +76,7 @@ def get_null( return deserialized def put_null( - self, string_body=None, custom_headers={}, raw=False, **operation_config): + self, string_body=None, custom_headers=None, raw=False, **operation_config): """ Set string value null @@ -122,7 +122,7 @@ def put_null( return client_raw_response def get_empty( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get empty string value value '' @@ -166,7 +166,7 @@ def get_empty( return deserialized def put_empty( - self, string_body, custom_headers={}, raw=False, **operation_config): + self, string_body, custom_headers=None, raw=False, **operation_config): """ Set string value empty '' @@ -209,7 +209,7 @@ def put_empty( return client_raw_response def get_mbcs( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get mbcs string value '啊齄丂狛狜隣郎隣兀﨩ˊ▇█〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€ @@ -255,7 +255,7 @@ def get_mbcs( return deserialized def put_mbcs( - self, string_body, custom_headers={}, raw=False, **operation_config): + self, string_body, custom_headers=None, raw=False, **operation_config): """ Set string value mbcs '啊齄丂狛狜隣郎隣兀﨩ˊ▇█〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€ @@ -302,7 +302,7 @@ def put_mbcs( return client_raw_response def get_whitespace( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get string value with leading and trailing whitespace 'Now is the time for all good men to come to the @@ -348,7 +348,7 @@ def get_whitespace( return deserialized def put_whitespace( - self, string_body, custom_headers={}, raw=False, **operation_config): + self, string_body, custom_headers=None, raw=False, **operation_config): """ Set String value with leading and trailing whitespace 'Now is the time for all good men to come to the @@ -394,7 +394,7 @@ def put_whitespace( return client_raw_response def get_not_provided( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get String value when no string value is sent in response payload @@ -438,7 +438,7 @@ def get_not_provided( return deserialized def get_base64_encoded( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get value that is base64 encoded @@ -482,7 +482,7 @@ def get_base64_encoded( return deserialized def get_base64_url_encoded( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get value that is base64url encoded @@ -526,7 +526,7 @@ def get_base64_url_encoded( return deserialized def put_base64_url_encoded( - self, string_body, custom_headers={}, raw=False, **operation_config): + self, string_body, custom_headers=None, raw=False, **operation_config): """ Put value that is base64url encoded @@ -569,7 +569,7 @@ def put_base64_url_encoded( return client_raw_response def get_null_base64_url_encoded( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get null value that is expected to be base64url encoded diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/operations/paths.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/operations/paths.py index 4d021f1088..478f2a330a 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/operations/paths.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/operations/paths.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_empty( - self, account_name, custom_headers={}, raw=False, **operation_config): + self, account_name, custom_headers=None, raw=False, **operation_config): """ Get a 200 to test a valid base uri diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/autorestparameterizedcustomhosttestclient/operations/paths.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/autorestparameterizedcustomhosttestclient/operations/paths.py index 2c43f455f7..5d17c7e4a6 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/autorestparameterizedcustomhosttestclient/operations/paths.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/autorestparameterizedcustomhosttestclient/operations/paths.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_empty( - self, vault, secret, key_name, key_version="v1", custom_headers={}, raw=False, **operation_config): + self, vault, secret, key_name, key_version="v1", custom_headers=None, raw=False, **operation_config): """ Get a 200 to test a valid base uri diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Header/autorestswaggerbatheaderservice/operations/header.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Header/autorestswaggerbatheaderservice/operations/header.py index 609425c074..22fc077e71 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Header/autorestswaggerbatheaderservice/operations/header.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Header/autorestswaggerbatheaderservice/operations/header.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def param_existing_key( - self, user_agent, custom_headers={}, raw=False, **operation_config): + self, user_agent, custom_headers=None, raw=False, **operation_config): """ Send a post request with header value "User-Agent": "overwrite" @@ -73,7 +73,7 @@ def param_existing_key( return client_raw_response def response_existing_key( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get a response with header value "User-Agent": "overwrite" @@ -113,7 +113,7 @@ def response_existing_key( return client_raw_response def param_protected_key( - self, content_type, custom_headers={}, raw=False, **operation_config): + self, content_type, custom_headers=None, raw=False, **operation_config): """ Send a post request with header value "Content-Type": "text/html" @@ -154,7 +154,7 @@ def param_protected_key( return client_raw_response def response_protected_key( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get a response with header value "Content-Type": "text/html" @@ -194,7 +194,7 @@ def response_protected_key( return client_raw_response def param_integer( - self, scenario, value, custom_headers={}, raw=False, **operation_config): + self, scenario, value, custom_headers=None, raw=False, **operation_config): """ Send a post request with header values "scenario": "positive", "value": 1 or "scenario": "negative", "value": -2 @@ -239,7 +239,7 @@ def param_integer( return client_raw_response def response_integer( - self, scenario, custom_headers={}, raw=False, **operation_config): + self, scenario, custom_headers=None, raw=False, **operation_config): """ Get a response with header value "value": 1 or -2 @@ -283,7 +283,7 @@ def response_integer( return client_raw_response def param_long( - self, scenario, value, custom_headers={}, raw=False, **operation_config): + self, scenario, value, custom_headers=None, raw=False, **operation_config): """ Send a post request with header values "scenario": "positive", "value": 105 or "scenario": "negative", "value": -2 @@ -328,7 +328,7 @@ def param_long( return client_raw_response def response_long( - self, scenario, custom_headers={}, raw=False, **operation_config): + self, scenario, custom_headers=None, raw=False, **operation_config): """ Get a response with header value "value": 105 or -2 @@ -372,7 +372,7 @@ def response_long( return client_raw_response def param_float( - self, scenario, value, custom_headers={}, raw=False, **operation_config): + self, scenario, value, custom_headers=None, raw=False, **operation_config): """ Send a post request with header values "scenario": "positive", "value": 0.07 or "scenario": "negative", "value": -3.0 @@ -417,7 +417,7 @@ def param_float( return client_raw_response def response_float( - self, scenario, custom_headers={}, raw=False, **operation_config): + self, scenario, custom_headers=None, raw=False, **operation_config): """ Get a response with header value "value": 0.07 or -3.0 @@ -461,7 +461,7 @@ def response_float( return client_raw_response def param_double( - self, scenario, value, custom_headers={}, raw=False, **operation_config): + self, scenario, value, custom_headers=None, raw=False, **operation_config): """ Send a post request with header values "scenario": "positive", "value": 7e120 or "scenario": "negative", "value": -3.0 @@ -506,7 +506,7 @@ def param_double( return client_raw_response def response_double( - self, scenario, custom_headers={}, raw=False, **operation_config): + self, scenario, custom_headers=None, raw=False, **operation_config): """ Get a response with header value "value": 7e120 or -3.0 @@ -550,7 +550,7 @@ def response_double( return client_raw_response def param_bool( - self, scenario, value, custom_headers={}, raw=False, **operation_config): + self, scenario, value, custom_headers=None, raw=False, **operation_config): """ Send a post request with header values "scenario": "true", "value": true or "scenario": "false", "value": false @@ -595,7 +595,7 @@ def param_bool( return client_raw_response def response_bool( - self, scenario, custom_headers={}, raw=False, **operation_config): + self, scenario, custom_headers=None, raw=False, **operation_config): """ Get a response with header value "value": true or false @@ -639,7 +639,7 @@ def response_bool( return client_raw_response def param_string( - self, scenario, value=None, custom_headers={}, raw=False, **operation_config): + self, scenario, value=None, custom_headers=None, raw=False, **operation_config): """ Send a post request with header values "scenario": "valid", "value": "The quick brown fox jumps over the lazy dog" or "scenario": "null", @@ -687,7 +687,7 @@ def param_string( return client_raw_response def response_string( - self, scenario, custom_headers={}, raw=False, **operation_config): + self, scenario, custom_headers=None, raw=False, **operation_config): """ Get a response with header values "The quick brown fox jumps over the lazy dog" or null or "" @@ -732,7 +732,7 @@ def response_string( return client_raw_response def param_date( - self, scenario, value, custom_headers={}, raw=False, **operation_config): + self, scenario, value, custom_headers=None, raw=False, **operation_config): """ Send a post request with header values "scenario": "valid", "value": "2010-01-01" or "scenario": "min", "value": "0001-01-01" @@ -778,7 +778,7 @@ def param_date( return client_raw_response def response_date( - self, scenario, custom_headers={}, raw=False, **operation_config): + self, scenario, custom_headers=None, raw=False, **operation_config): """ Get a response with header values "2010-01-01" or "0001-01-01" @@ -822,7 +822,7 @@ def response_date( return client_raw_response def param_datetime( - self, scenario, value, custom_headers={}, raw=False, **operation_config): + self, scenario, value, custom_headers=None, raw=False, **operation_config): """ Send a post request with header values "scenario": "valid", "value": "2010-01-01T12:34:56Z" or "scenario": "min", "value": @@ -869,7 +869,7 @@ def param_datetime( return client_raw_response def response_datetime( - self, scenario, custom_headers={}, raw=False, **operation_config): + self, scenario, custom_headers=None, raw=False, **operation_config): """ Get a response with header values "2010-01-01T12:34:56Z" or "0001-01-01T00:00:00Z" @@ -914,7 +914,7 @@ def response_datetime( return client_raw_response def param_datetime_rfc1123( - self, scenario, value=None, custom_headers={}, raw=False, **operation_config): + self, scenario, value=None, custom_headers=None, raw=False, **operation_config): """ Send a post request with header values "scenario": "valid", "value": "Wed, 01 Jan 2010 12:34:56 GMT" or "scenario": "min", "value": "Mon, @@ -962,7 +962,7 @@ def param_datetime_rfc1123( return client_raw_response def response_datetime_rfc1123( - self, scenario, custom_headers={}, raw=False, **operation_config): + self, scenario, custom_headers=None, raw=False, **operation_config): """ Get a response with header values "Wed, 01 Jan 2010 12:34:56 GMT" or "Mon, 01 Jan 0001 00:00:00 GMT" @@ -1007,7 +1007,7 @@ def response_datetime_rfc1123( return client_raw_response def param_duration( - self, scenario, value, custom_headers={}, raw=False, **operation_config): + self, scenario, value, custom_headers=None, raw=False, **operation_config): """ Send a post request with header values "scenario": "valid", "value": "P123DT22H14M12.011S" @@ -1053,7 +1053,7 @@ def param_duration( return client_raw_response def response_duration( - self, scenario, custom_headers={}, raw=False, **operation_config): + self, scenario, custom_headers=None, raw=False, **operation_config): """ Get a response with header values "P123DT22H14M12.011S" @@ -1097,7 +1097,7 @@ def response_duration( return client_raw_response def param_byte( - self, scenario, value, custom_headers={}, raw=False, **operation_config): + self, scenario, value, custom_headers=None, raw=False, **operation_config): """ Send a post request with header values "scenario": "valid", "value": "啊齄丂狛狜隣郎隣兀﨩" @@ -1142,7 +1142,7 @@ def param_byte( return client_raw_response def response_byte( - self, scenario, custom_headers={}, raw=False, **operation_config): + self, scenario, custom_headers=None, raw=False, **operation_config): """ Get a response with header values "啊齄丂狛狜隣郎隣兀﨩" @@ -1186,7 +1186,7 @@ def response_byte( return client_raw_response def param_enum( - self, scenario, value=None, custom_headers={}, raw=False, **operation_config): + self, scenario, value=None, custom_headers=None, raw=False, **operation_config): """ Send a post request with header values "scenario": "valid", "value": "GREY" or "scenario": "null", "value": null @@ -1234,7 +1234,7 @@ def param_enum( return client_raw_response def response_enum( - self, scenario, custom_headers={}, raw=False, **operation_config): + self, scenario, custom_headers=None, raw=False, **operation_config): """ Get a response with header values "GREY" or null @@ -1278,7 +1278,7 @@ def response_enum( return client_raw_response def custom_request_id( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_client_failure.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_client_failure.py index 64ad7a1e8b..ec65a8c9a8 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_client_failure.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_client_failure.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def head400( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 400 status code - should be represented in the client as an error @@ -70,7 +70,7 @@ def head400( return client_raw_response def get400( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 400 status code - should be represented in the client as an error @@ -108,7 +108,7 @@ def get400( return client_raw_response def put400( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 400 status code - should be represented in the client as an error @@ -155,7 +155,7 @@ def put400( return client_raw_response def patch400( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 400 status code - should be represented in the client as an error @@ -202,7 +202,7 @@ def patch400( return client_raw_response def post400( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 400 status code - should be represented in the client as an error @@ -249,7 +249,7 @@ def post400( return client_raw_response def delete400( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 400 status code - should be represented in the client as an error @@ -296,7 +296,7 @@ def delete400( return client_raw_response def head401( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 401 status code - should be represented in the client as an error @@ -334,7 +334,7 @@ def head401( return client_raw_response def get402( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 402 status code - should be represented in the client as an error @@ -372,7 +372,7 @@ def get402( return client_raw_response def get403( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 403 status code - should be represented in the client as an error @@ -410,7 +410,7 @@ def get403( return client_raw_response def put404( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 404 status code - should be represented in the client as an error @@ -457,7 +457,7 @@ def put404( return client_raw_response def patch405( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 405 status code - should be represented in the client as an error @@ -504,7 +504,7 @@ def patch405( return client_raw_response def post406( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 406 status code - should be represented in the client as an error @@ -551,7 +551,7 @@ def post406( return client_raw_response def delete407( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 407 status code - should be represented in the client as an error @@ -598,7 +598,7 @@ def delete407( return client_raw_response def put409( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 409 status code - should be represented in the client as an error @@ -645,7 +645,7 @@ def put409( return client_raw_response def head410( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 410 status code - should be represented in the client as an error @@ -683,7 +683,7 @@ def head410( return client_raw_response def get411( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 411 status code - should be represented in the client as an error @@ -721,7 +721,7 @@ def get411( return client_raw_response def get412( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 412 status code - should be represented in the client as an error @@ -759,7 +759,7 @@ def get412( return client_raw_response def put413( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 413 status code - should be represented in the client as an error @@ -806,7 +806,7 @@ def put413( return client_raw_response def patch414( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 414 status code - should be represented in the client as an error @@ -853,7 +853,7 @@ def patch414( return client_raw_response def post415( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 415 status code - should be represented in the client as an error @@ -900,7 +900,7 @@ def post415( return client_raw_response def get416( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 416 status code - should be represented in the client as an error @@ -938,7 +938,7 @@ def get416( return client_raw_response def delete417( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 417 status code - should be represented in the client as an error @@ -985,7 +985,7 @@ def delete417( return client_raw_response def head429( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 429 status code - should be represented in the client as an error diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_failure.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_failure.py index 3b6bcfdadb..52f9489f48 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_failure.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_failure.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_empty_error( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get empty error form server @@ -77,7 +77,7 @@ def get_empty_error( return deserialized def get_no_model_error( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get empty error form server diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_redirects.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_redirects.py index 4ad2975375..ac3da64a46 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_redirects.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_redirects.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def head300( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 300 status code and redirect to /http/success/200 @@ -72,7 +72,7 @@ def head300( return client_raw_response def get300( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 300 status code and redirect to /http/success/200 @@ -121,7 +121,7 @@ def get300( return deserialized def head301( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 301 status code and redirect to /http/success/200 @@ -161,7 +161,7 @@ def head301( return client_raw_response def get301( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 301 status code and redirect to /http/success/200 @@ -201,7 +201,7 @@ def get301( return client_raw_response def put301( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Put true Boolean value in request returns 301. This request should not be automatically redirected, but should return the received 301 @@ -252,7 +252,7 @@ def put301( return client_raw_response def head302( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 302 status code and redirect to /http/success/200 @@ -292,7 +292,7 @@ def head302( return client_raw_response def get302( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 302 status code and redirect to /http/success/200 @@ -332,7 +332,7 @@ def get302( return client_raw_response def patch302( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Patch true Boolean value in request returns 302. This request should not be automatically redirected, but should return the received 302 @@ -383,7 +383,7 @@ def patch302( return client_raw_response def post303( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Post true Boolean value in request returns 303. This request should be automatically redirected usign a get, ultimately returning a 200 @@ -434,7 +434,7 @@ def post303( return client_raw_response def head307( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Redirect with 307, resulting in a 200 success @@ -474,7 +474,7 @@ def head307( return client_raw_response def get307( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Redirect get with 307, resulting in a 200 success @@ -514,7 +514,7 @@ def get307( return client_raw_response def put307( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Put redirected with 307, resulting in a 200 after redirect @@ -563,7 +563,7 @@ def put307( return client_raw_response def patch307( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Patch redirected with 307, resulting in a 200 after redirect @@ -612,7 +612,7 @@ def patch307( return client_raw_response def post307( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Post redirected with 307, resulting in a 200 after redirect @@ -661,7 +661,7 @@ def post307( return client_raw_response def delete307( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Delete redirected with 307, resulting in a 200 after redirect diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_retry.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_retry.py index 0356348b5f..599a89f879 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_retry.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_retry.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def head408( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 408 status code, then 200 after retry @@ -69,7 +69,7 @@ def head408( return client_raw_response def put500( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 500 status code, then 200 after retry @@ -115,7 +115,7 @@ def put500( return client_raw_response def patch500( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 500 status code, then 200 after retry @@ -161,7 +161,7 @@ def patch500( return client_raw_response def get502( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 502 status code, then 200 after retry @@ -198,7 +198,7 @@ def get502( return client_raw_response def post503( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 503 status code, then 200 after retry @@ -244,7 +244,7 @@ def post503( return client_raw_response def delete503( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 503 status code, then 200 after retry @@ -290,7 +290,7 @@ def delete503( return client_raw_response def put504( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 504 status code, then 200 after retry @@ -336,7 +336,7 @@ def put504( return client_raw_response def patch504( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 504 status code, then 200 after retry diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_server_failure.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_server_failure.py index 761dead10b..94181adb61 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_server_failure.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_server_failure.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def head501( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 501 status code - should be represented in the client as an error @@ -70,7 +70,7 @@ def head501( return client_raw_response def get501( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 501 status code - should be represented in the client as an error @@ -108,7 +108,7 @@ def get501( return client_raw_response def post505( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 505 status code - should be represented in the client as an error @@ -155,7 +155,7 @@ def post505( return client_raw_response def delete505( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Return 505 status code - should be represented in the client as an error diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_success.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_success.py index 1334f8b0c2..b5ff9b7873 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_success.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/http_success.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def head200( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 200 status code if successful @@ -69,7 +69,7 @@ def head200( return client_raw_response def get200( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get 200 success @@ -113,7 +113,7 @@ def get200( return deserialized def put200( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Put boolean value true returning 200 success @@ -159,7 +159,7 @@ def put200( return client_raw_response def patch200( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Patch true Boolean value in request returning 200 @@ -205,7 +205,7 @@ def patch200( return client_raw_response def post200( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Post bollean value true in request that returns a 200 @@ -251,7 +251,7 @@ def post200( return client_raw_response def delete200( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Delete simple boolean value true returns 200 @@ -297,7 +297,7 @@ def delete200( return client_raw_response def put201( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Put true Boolean value in request returns 201 @@ -343,7 +343,7 @@ def put201( return client_raw_response def post201( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Post true Boolean value in request returns 201 (Created) @@ -389,7 +389,7 @@ def post201( return client_raw_response def put202( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Put true Boolean value in request returns 202 (Accepted) @@ -435,7 +435,7 @@ def put202( return client_raw_response def patch202( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Patch true Boolean value in request returns 202 @@ -481,7 +481,7 @@ def patch202( return client_raw_response def post202( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Post true Boolean value in request returns 202 (Accepted) @@ -527,7 +527,7 @@ def post202( return client_raw_response def delete202( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Delete true Boolean value in request returns 202 (accepted) @@ -573,7 +573,7 @@ def delete202( return client_raw_response def head204( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 204 status code if successful @@ -610,7 +610,7 @@ def head204( return client_raw_response def put204( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Put true Boolean value in request returns 204 (no content) @@ -656,7 +656,7 @@ def put204( return client_raw_response def patch204( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Patch true Boolean value in request returns 204 (no content) @@ -702,7 +702,7 @@ def patch204( return client_raw_response def post204( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Post true Boolean value in request returns 204 (no content) @@ -748,7 +748,7 @@ def post204( return client_raw_response def delete204( - self, boolean_value=None, custom_headers={}, raw=False, **operation_config): + self, boolean_value=None, custom_headers=None, raw=False, **operation_config): """ Delete true Boolean value in request returns 204 (no content) @@ -794,7 +794,7 @@ def delete204( return client_raw_response def head404( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Return 404 status code diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/multiple_responses.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/multiple_responses.py index 04a9b92e59..486c5e5fbf 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/multiple_responses.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/operations/multiple_responses.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get200_model204_no_model_default_error200_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with valid payload: {'statusCode': '200'} @@ -77,7 +77,7 @@ def get200_model204_no_model_default_error200_valid( return deserialized def get200_model204_no_model_default_error204_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 204 response with no payload @@ -121,7 +121,7 @@ def get200_model204_no_model_default_error204_valid( return deserialized def get200_model204_no_model_default_error201_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 201 response with valid payload: {'statusCode': '201'} @@ -165,7 +165,7 @@ def get200_model204_no_model_default_error201_invalid( return deserialized def get200_model204_no_model_default_error202_none( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 202 response with no payload: @@ -209,7 +209,7 @@ def get200_model204_no_model_default_error202_none( return deserialized def get200_model204_no_model_default_error400_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 400 response with valid error payload: {'status': 400, 'message': 'client error'} @@ -254,7 +254,7 @@ def get200_model204_no_model_default_error400_valid( return deserialized def get200_model201_model_default_error200_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with valid payload: {'statusCode': '200'} @@ -300,7 +300,7 @@ def get200_model201_model_default_error200_valid( return deserialized def get200_model201_model_default_error201_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 201 response with valid payload: {'statusCode': '201', 'textStatusCode': 'Created'} @@ -347,7 +347,7 @@ def get200_model201_model_default_error201_valid( return deserialized def get200_model201_model_default_error400_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 400 response with valid payload: {'code': '400', 'message': 'client error'} @@ -394,7 +394,7 @@ def get200_model201_model_default_error400_valid( return deserialized def get200_model_a201_model_c404_model_ddefault_error200_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with valid payload: {'statusCode': '200'} @@ -442,7 +442,7 @@ def get200_model_a201_model_c404_model_ddefault_error200_valid( return deserialized def get200_model_a201_model_c404_model_ddefault_error201_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with valid payload: {'httpCode': '201'} @@ -490,7 +490,7 @@ def get200_model_a201_model_c404_model_ddefault_error201_valid( return deserialized def get200_model_a201_model_c404_model_ddefault_error404_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with valid payload: {'httpStatusCode': '404'} @@ -538,7 +538,7 @@ def get200_model_a201_model_c404_model_ddefault_error404_valid( return deserialized def get200_model_a201_model_c404_model_ddefault_error400_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 400 response with valid payload: {'code': '400', 'message': 'client error'} @@ -587,7 +587,7 @@ def get200_model_a201_model_c404_model_ddefault_error400_valid( return deserialized def get202_none204_none_default_error202_none( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 202 response with no payload @@ -624,7 +624,7 @@ def get202_none204_none_default_error202_none( return client_raw_response def get202_none204_none_default_error204_none( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 204 response with no payload @@ -661,7 +661,7 @@ def get202_none204_none_default_error204_none( return client_raw_response def get202_none204_none_default_error400_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 400 response with valid payload: {'code': '400', 'message': 'client error'} @@ -699,7 +699,7 @@ def get202_none204_none_default_error400_valid( return client_raw_response def get202_none204_none_default_none202_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 202 response with an unexpected payload {'property': 'value'} @@ -736,7 +736,7 @@ def get202_none204_none_default_none202_invalid( return client_raw_response def get202_none204_none_default_none204_none( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 204 response with no payload @@ -773,7 +773,7 @@ def get202_none204_none_default_none204_none( return client_raw_response def get202_none204_none_default_none400_none( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 400 response with no payload @@ -810,7 +810,7 @@ def get202_none204_none_default_none400_none( return client_raw_response def get202_none204_none_default_none400_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 400 response with an unexpected payload {'property': 'value'} @@ -847,7 +847,7 @@ def get202_none204_none_default_none400_invalid( return client_raw_response def get_default_model_a200_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with valid payload: {'statusCode': '200'} @@ -884,7 +884,7 @@ def get_default_model_a200_valid( return client_raw_response def get_default_model_a200_none( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with no payload @@ -921,7 +921,7 @@ def get_default_model_a200_none( return client_raw_response def get_default_model_a400_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 400 response with valid payload: {'statusCode': '400'} @@ -958,7 +958,7 @@ def get_default_model_a400_valid( return client_raw_response def get_default_model_a400_none( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 400 response with no payload @@ -995,7 +995,7 @@ def get_default_model_a400_none( return client_raw_response def get_default_none200_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with invalid payload: {'statusCode': '200'} @@ -1032,7 +1032,7 @@ def get_default_none200_invalid( return client_raw_response def get_default_none200_none( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with no payload @@ -1069,7 +1069,7 @@ def get_default_none200_none( return client_raw_response def get_default_none400_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 400 response with valid payload: {'statusCode': '400'} @@ -1106,7 +1106,7 @@ def get_default_none400_invalid( return client_raw_response def get_default_none400_none( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 400 response with no payload @@ -1143,7 +1143,7 @@ def get_default_none400_none( return client_raw_response def get200_model_a200_none( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with no payload, when a payload is expected - client should return a null object of thde type for model A @@ -1188,7 +1188,7 @@ def get200_model_a200_none( return deserialized def get200_model_a200_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with payload {'statusCode': '200'} @@ -1232,7 +1232,7 @@ def get200_model_a200_valid( return deserialized def get200_model_a200_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with invalid payload {'statusCodeInvalid': '200'} @@ -1276,7 +1276,7 @@ def get200_model_a200_invalid( return deserialized def get200_model_a400_none( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 400 response with no payload client should treat as an http error with no error model @@ -1321,7 +1321,7 @@ def get200_model_a400_none( return deserialized def get200_model_a400_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with payload {'statusCode': '400'} @@ -1365,7 +1365,7 @@ def get200_model_a400_valid( return deserialized def get200_model_a400_invalid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 200 response with invalid payload {'statusCodeInvalid': '400'} @@ -1409,7 +1409,7 @@ def get200_model_a400_invalid( return deserialized def get200_model_a202_valid( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Send a 202 response with payload {'statusCode': '202'} diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ModelFlattening/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ModelFlattening/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py index 843afe11e4..77be907a69 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ModelFlattening/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ModelFlattening/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py @@ -58,7 +58,7 @@ def __init__( def put_array( - self, resource_array=None, custom_headers={}, raw=False, **operation_config): + self, resource_array=None, custom_headers=None, raw=False, **operation_config): """ Put External Resource as an Array @@ -105,7 +105,7 @@ def put_array( return client_raw_response def get_array( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get External Resource as an Array @@ -150,7 +150,7 @@ def get_array( return deserialized def put_dictionary( - self, resource_dictionary=None, custom_headers={}, raw=False, **operation_config): + self, resource_dictionary=None, custom_headers=None, raw=False, **operation_config): """ Put External Resource as a Dictionary @@ -196,7 +196,7 @@ def put_dictionary( return client_raw_response def get_dictionary( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get External Resource as a Dictionary @@ -240,7 +240,7 @@ def get_dictionary( return deserialized def put_resource_collection( - self, resource_complex_object=None, custom_headers={}, raw=False, **operation_config): + self, resource_complex_object=None, custom_headers=None, raw=False, **operation_config): """ Put External Resource as a ResourceCollection @@ -288,7 +288,7 @@ def put_resource_collection( return client_raw_response def get_resource_collection( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get External Resource as a ResourceCollection @@ -333,7 +333,7 @@ def get_resource_collection( return deserialized def put_simple_product( - self, simple_body_product=None, custom_headers={}, raw=False, **operation_config): + self, simple_body_product=None, custom_headers=None, raw=False, **operation_config): """ Put Simple Product with client flattening true on the model @@ -388,7 +388,7 @@ def put_simple_product( return deserialized def post_flattened_simple_product( - self, product_id, max_product_display_name, description=None, generic_value=None, odatavalue=None, custom_headers={}, raw=False, **operation_config): + self, product_id, max_product_display_name, description=None, generic_value=None, odatavalue=None, custom_headers=None, raw=False, **operation_config): """ Put Flattened Simple Product with client flattening true on the parameter @@ -457,7 +457,7 @@ def post_flattened_simple_product( return deserialized def put_simple_product_with_grouping( - self, flatten_parameter_group, custom_headers={}, raw=False, **operation_config): + self, flatten_parameter_group, custom_headers=None, raw=False, **operation_config): """ Put Simple Product with client flattening true on the model diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ParameterFlattening/autorestparameterflattening/operations/availability_sets.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ParameterFlattening/autorestparameterflattening/operations/availability_sets.py index ec69672916..a45da1f5bf 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ParameterFlattening/autorestparameterflattening/operations/availability_sets.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ParameterFlattening/autorestparameterflattening/operations/availability_sets.py @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def update( - self, resource_group_name, avset, tags, custom_headers={}, raw=False, **operation_config): + self, resource_group_name, avset, tags, custom_headers=None, raw=False, **operation_config): """ Updates the tags for an availability set. diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Report/autorestreportservice/auto_rest_report_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Report/autorestreportservice/auto_rest_report_service.py index 59192a6fd2..caa51db500 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Report/autorestreportservice/auto_rest_report_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Report/autorestreportservice/auto_rest_report_service.py @@ -58,7 +58,7 @@ def __init__( def get_report( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Get test coverage report diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/operations/explicit.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/operations/explicit.py index 4f56d1d617..359feac463 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/operations/explicit.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/operations/explicit.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def post_required_integer_parameter( - self, body_parameter, custom_headers={}, raw=False, **operation_config): + self, body_parameter, custom_headers=None, raw=False, **operation_config): """ Test explicitly required integer. Please put null and the client library should throw before the request is sent. @@ -77,7 +77,7 @@ def post_required_integer_parameter( return client_raw_response def post_optional_integer_parameter( - self, body_parameter=None, custom_headers={}, raw=False, **operation_config): + self, body_parameter=None, custom_headers=None, raw=False, **operation_config): """ Test explicitly optional integer. Please put null. @@ -123,7 +123,7 @@ def post_optional_integer_parameter( return client_raw_response def post_required_integer_property( - self, value, custom_headers={}, raw=False, **operation_config): + self, value, custom_headers=None, raw=False, **operation_config): """ Test explicitly required integer. Please put a valid int-wrapper with 'value' = null and the client library should throw before the request @@ -171,7 +171,7 @@ def post_required_integer_property( return client_raw_response def post_optional_integer_property( - self, value=None, custom_headers={}, raw=False, **operation_config): + self, value=None, custom_headers=None, raw=False, **operation_config): """ Test explicitly optional integer. Please put a valid int-wrapper with 'value' = null. @@ -222,7 +222,7 @@ def post_optional_integer_property( return client_raw_response def post_required_integer_header( - self, header_parameter, custom_headers={}, raw=False, **operation_config): + self, header_parameter, custom_headers=None, raw=False, **operation_config): """ Test explicitly required integer. Please put a header 'headerParameter' => null and the client library should throw before @@ -265,7 +265,7 @@ def post_required_integer_header( return client_raw_response def post_optional_integer_header( - self, header_parameter=None, custom_headers={}, raw=False, **operation_config): + self, header_parameter=None, custom_headers=None, raw=False, **operation_config): """ Test explicitly optional integer. Please put a header 'headerParameter' => null. @@ -307,7 +307,7 @@ def post_optional_integer_header( return client_raw_response def post_required_string_parameter( - self, body_parameter, custom_headers={}, raw=False, **operation_config): + self, body_parameter, custom_headers=None, raw=False, **operation_config): """ Test explicitly required string. Please put null and the client library should throw before the request is sent. @@ -352,7 +352,7 @@ def post_required_string_parameter( return client_raw_response def post_optional_string_parameter( - self, body_parameter=None, custom_headers={}, raw=False, **operation_config): + self, body_parameter=None, custom_headers=None, raw=False, **operation_config): """ Test explicitly optional string. Please put null. @@ -398,7 +398,7 @@ def post_optional_string_parameter( return client_raw_response def post_required_string_property( - self, value, custom_headers={}, raw=False, **operation_config): + self, value, custom_headers=None, raw=False, **operation_config): """ Test explicitly required string. Please put a valid string-wrapper with 'value' = null and the client library should throw before the @@ -446,7 +446,7 @@ def post_required_string_property( return client_raw_response def post_optional_string_property( - self, value=None, custom_headers={}, raw=False, **operation_config): + self, value=None, custom_headers=None, raw=False, **operation_config): """ Test explicitly optional integer. Please put a valid string-wrapper with 'value' = null. @@ -497,7 +497,7 @@ def post_optional_string_property( return client_raw_response def post_required_string_header( - self, header_parameter, custom_headers={}, raw=False, **operation_config): + self, header_parameter, custom_headers=None, raw=False, **operation_config): """ Test explicitly required string. Please put a header 'headerParameter' => null and the client library should throw before the request is @@ -540,7 +540,7 @@ def post_required_string_header( return client_raw_response def post_optional_string_header( - self, body_parameter=None, custom_headers={}, raw=False, **operation_config): + self, body_parameter=None, custom_headers=None, raw=False, **operation_config): """ Test explicitly optional string. Please put a header 'headerParameter' => null. @@ -582,7 +582,7 @@ def post_optional_string_header( return client_raw_response def post_required_class_parameter( - self, body_parameter, custom_headers={}, raw=False, **operation_config): + self, body_parameter, custom_headers=None, raw=False, **operation_config): """ Test explicitly required complex object. Please put null and the client library should throw before the request is sent. @@ -628,7 +628,7 @@ def post_required_class_parameter( return client_raw_response def post_optional_class_parameter( - self, body_parameter=None, custom_headers={}, raw=False, **operation_config): + self, body_parameter=None, custom_headers=None, raw=False, **operation_config): """ Test explicitly optional complex object. Please put null. @@ -675,7 +675,7 @@ def post_optional_class_parameter( return client_raw_response def post_required_class_property( - self, value, custom_headers={}, raw=False, **operation_config): + self, value, custom_headers=None, raw=False, **operation_config): """ Test explicitly required complex object. Please put a valid class-wrapper with 'value' = null and the client library should throw @@ -724,7 +724,7 @@ def post_required_class_property( return client_raw_response def post_optional_class_property( - self, value=None, custom_headers={}, raw=False, **operation_config): + self, value=None, custom_headers=None, raw=False, **operation_config): """ Test explicitly optional complex object. Please put a valid class-wrapper with 'value' = null. @@ -776,7 +776,7 @@ def post_optional_class_property( return client_raw_response def post_required_array_parameter( - self, body_parameter, custom_headers={}, raw=False, **operation_config): + self, body_parameter, custom_headers=None, raw=False, **operation_config): """ Test explicitly required array. Please put null and the client library should throw before the request is sent. @@ -821,7 +821,7 @@ def post_required_array_parameter( return client_raw_response def post_optional_array_parameter( - self, body_parameter=None, custom_headers={}, raw=False, **operation_config): + self, body_parameter=None, custom_headers=None, raw=False, **operation_config): """ Test explicitly optional array. Please put null. @@ -867,7 +867,7 @@ def post_optional_array_parameter( return client_raw_response def post_required_array_property( - self, value, custom_headers={}, raw=False, **operation_config): + self, value, custom_headers=None, raw=False, **operation_config): """ Test explicitly required array. Please put a valid array-wrapper with 'value' = null and the client library should throw before the request @@ -915,7 +915,7 @@ def post_required_array_property( return client_raw_response def post_optional_array_property( - self, value=None, custom_headers={}, raw=False, **operation_config): + self, value=None, custom_headers=None, raw=False, **operation_config): """ Test explicitly optional array. Please put a valid array-wrapper with 'value' = null. @@ -966,7 +966,7 @@ def post_optional_array_property( return client_raw_response def post_required_array_header( - self, header_parameter, custom_headers={}, raw=False, **operation_config): + self, header_parameter, custom_headers=None, raw=False, **operation_config): """ Test explicitly required array. Please put a header 'headerParameter' => null and the client library should throw before the request is @@ -1009,7 +1009,7 @@ def post_required_array_header( return client_raw_response def post_optional_array_header( - self, header_parameter=None, custom_headers={}, raw=False, **operation_config): + self, header_parameter=None, custom_headers=None, raw=False, **operation_config): """ Test explicitly optional integer. Please put a header 'headerParameter' => null. diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/operations/implicit.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/operations/implicit.py index cddb3b124e..91919cfd00 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/operations/implicit.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/operations/implicit.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_required_path( - self, path_parameter, custom_headers={}, raw=False, **operation_config): + self, path_parameter, custom_headers=None, raw=False, **operation_config): """ Test implicitly required path parameter @@ -76,7 +76,7 @@ def get_required_path( return client_raw_response def put_optional_query( - self, query_parameter=None, custom_headers={}, raw=False, **operation_config): + self, query_parameter=None, custom_headers=None, raw=False, **operation_config): """ Test implicitly optional query parameter @@ -117,7 +117,7 @@ def put_optional_query( return client_raw_response def put_optional_header( - self, query_parameter=None, custom_headers={}, raw=False, **operation_config): + self, query_parameter=None, custom_headers=None, raw=False, **operation_config): """ Test implicitly optional header parameter @@ -158,7 +158,7 @@ def put_optional_header( return client_raw_response def put_optional_body( - self, body_parameter=None, custom_headers={}, raw=False, **operation_config): + self, body_parameter=None, custom_headers=None, raw=False, **operation_config): """ Test implicitly optional body parameter @@ -204,7 +204,7 @@ def put_optional_body( return client_raw_response def get_required_global_path( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Test implicitly required path parameter @@ -246,7 +246,7 @@ def get_required_global_path( return client_raw_response def get_required_global_query( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Test implicitly required query parameter @@ -285,7 +285,7 @@ def get_required_global_query( return client_raw_response def get_optional_global_query( - self, custom_headers={}, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """ Test implicitly optional query parameter diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/operations/path_items.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/operations/path_items.py index 52f1f2feba..d3f3e72c6e 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/operations/path_items.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/operations/path_items.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_all_with_values( - self, local_string_path, path_item_string_path, local_string_query=None, path_item_string_query=None, custom_headers={}, raw=False, **operation_config): + self, local_string_path, path_item_string_path, local_string_query=None, path_item_string_query=None, custom_headers=None, raw=False, **operation_config): """ send globalStringPath='globalStringPath', pathItemStringPath='pathItemStringPath', @@ -96,7 +96,7 @@ def get_all_with_values( return client_raw_response def get_global_query_null( - self, local_string_path, path_item_string_path, local_string_query=None, path_item_string_query=None, custom_headers={}, raw=False, **operation_config): + self, local_string_path, path_item_string_path, local_string_query=None, path_item_string_query=None, custom_headers=None, raw=False, **operation_config): """ send globalStringPath='globalStringPath', pathItemStringPath='pathItemStringPath', @@ -159,7 +159,7 @@ def get_global_query_null( return client_raw_response def get_global_and_local_query_null( - self, local_string_path, path_item_string_path, local_string_query=None, path_item_string_query=None, custom_headers={}, raw=False, **operation_config): + self, local_string_path, path_item_string_path, local_string_query=None, path_item_string_query=None, custom_headers=None, raw=False, **operation_config): """ send globalStringPath=globalStringPath, pathItemStringPath='pathItemStringPath', @@ -221,7 +221,7 @@ def get_global_and_local_query_null( return client_raw_response def get_local_path_item_query_null( - self, local_string_path, path_item_string_path, local_string_query=None, path_item_string_query=None, custom_headers={}, raw=False, **operation_config): + self, local_string_path, path_item_string_path, local_string_query=None, path_item_string_query=None, custom_headers=None, raw=False, **operation_config): """ send globalStringPath='globalStringPath', pathItemStringPath='pathItemStringPath', diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/operations/paths.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/operations/paths.py index 9084ae4dc9..c5e497e11e 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/operations/paths.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/operations/paths.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_boolean_true( - self, bool_path=False, custom_headers={}, raw=False, **operation_config): + self, bool_path=False, custom_headers=None, raw=False, **operation_config): """ Get true Boolean value on path @@ -75,7 +75,7 @@ def get_boolean_true( return client_raw_response def get_boolean_false( - self, bool_path=False, custom_headers={}, raw=False, **operation_config): + self, bool_path=False, custom_headers=None, raw=False, **operation_config): """ Get false Boolean value on path @@ -118,7 +118,7 @@ def get_boolean_false( return client_raw_response def get_int_one_million( - self, int_path=1000000, custom_headers={}, raw=False, **operation_config): + self, int_path=1000000, custom_headers=None, raw=False, **operation_config): """ Get '1000000' integer value @@ -161,7 +161,7 @@ def get_int_one_million( return client_raw_response def get_int_negative_one_million( - self, int_path=-1000000, custom_headers={}, raw=False, **operation_config): + self, int_path=-1000000, custom_headers=None, raw=False, **operation_config): """ Get '-1000000' integer value @@ -204,7 +204,7 @@ def get_int_negative_one_million( return client_raw_response def get_ten_billion( - self, long_path=10000000000, custom_headers={}, raw=False, **operation_config): + self, long_path=10000000000, custom_headers=None, raw=False, **operation_config): """ Get '10000000000' 64 bit integer value @@ -247,7 +247,7 @@ def get_ten_billion( return client_raw_response def get_negative_ten_billion( - self, long_path=-10000000000, custom_headers={}, raw=False, **operation_config): + self, long_path=-10000000000, custom_headers=None, raw=False, **operation_config): """ Get '-10000000000' 64 bit integer value @@ -290,7 +290,7 @@ def get_negative_ten_billion( return client_raw_response def float_scientific_positive( - self, float_path=1.034E+20, custom_headers={}, raw=False, **operation_config): + self, float_path=1.034E+20, custom_headers=None, raw=False, **operation_config): """ Get '1.034E+20' numeric value @@ -333,7 +333,7 @@ def float_scientific_positive( return client_raw_response def float_scientific_negative( - self, float_path=-1.034E-20, custom_headers={}, raw=False, **operation_config): + self, float_path=-1.034E-20, custom_headers=None, raw=False, **operation_config): """ Get '-1.034E-20' numeric value @@ -376,7 +376,7 @@ def float_scientific_negative( return client_raw_response def double_decimal_positive( - self, double_path=9999999.999, custom_headers={}, raw=False, **operation_config): + self, double_path=9999999.999, custom_headers=None, raw=False, **operation_config): """ Get '9999999.999' numeric value @@ -419,7 +419,7 @@ def double_decimal_positive( return client_raw_response def double_decimal_negative( - self, double_path=-9999999.999, custom_headers={}, raw=False, **operation_config): + self, double_path=-9999999.999, custom_headers=None, raw=False, **operation_config): """ Get '-9999999.999' numeric value @@ -462,7 +462,7 @@ def double_decimal_negative( return client_raw_response def string_unicode( - self, string_path="啊齄丂狛狜隣郎隣兀﨩", custom_headers={}, raw=False, **operation_config): + self, string_path="啊齄丂狛狜隣郎隣兀﨩", custom_headers=None, raw=False, **operation_config): """ Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value @@ -505,7 +505,7 @@ def string_unicode( return client_raw_response def string_url_encoded( - self, string_path="begin!*'();:@ &=+$,/?#[]end", custom_headers={}, raw=False, **operation_config): + self, string_path="begin!*'();:@ &=+$,/?#[]end", custom_headers=None, raw=False, **operation_config): """ Get 'begin!*'();:@ &=+$,/?#[]end @@ -549,7 +549,7 @@ def string_url_encoded( return client_raw_response def string_empty( - self, string_path="", custom_headers={}, raw=False, **operation_config): + self, string_path="", custom_headers=None, raw=False, **operation_config): """ Get '' @@ -592,7 +592,7 @@ def string_empty( return client_raw_response def string_null( - self, string_path, custom_headers={}, raw=False, **operation_config): + self, string_path, custom_headers=None, raw=False, **operation_config): """ Get null (should throw) @@ -635,7 +635,7 @@ def string_null( return client_raw_response def enum_valid( - self, enum_path, custom_headers={}, raw=False, **operation_config): + self, enum_path, custom_headers=None, raw=False, **operation_config): """ Get using uri with 'green color' in path parameter @@ -680,7 +680,7 @@ def enum_valid( return client_raw_response def enum_null( - self, enum_path, custom_headers={}, raw=False, **operation_config): + self, enum_path, custom_headers=None, raw=False, **operation_config): """ Get null (should throw on the client before the request is sent on wire) @@ -726,7 +726,7 @@ def enum_null( return client_raw_response def byte_multi_byte( - self, byte_path, custom_headers={}, raw=False, **operation_config): + self, byte_path, custom_headers=None, raw=False, **operation_config): """ Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array @@ -770,7 +770,7 @@ def byte_multi_byte( return client_raw_response def byte_empty( - self, byte_path=bytearray("", encoding="utf-8"), custom_headers={}, raw=False, **operation_config): + self, byte_path=bytearray("", encoding="utf-8"), custom_headers=None, raw=False, **operation_config): """ Get '' as byte array @@ -813,7 +813,7 @@ def byte_empty( return client_raw_response def byte_null( - self, byte_path, custom_headers={}, raw=False, **operation_config): + self, byte_path, custom_headers=None, raw=False, **operation_config): """ Get null as byte array (should throw) @@ -856,7 +856,7 @@ def byte_null( return client_raw_response def date_valid( - self, date_path, custom_headers={}, raw=False, **operation_config): + self, date_path, custom_headers=None, raw=False, **operation_config): """ Get '2012-01-01' as date @@ -899,7 +899,7 @@ def date_valid( return client_raw_response def date_null( - self, date_path, custom_headers={}, raw=False, **operation_config): + self, date_path, custom_headers=None, raw=False, **operation_config): """ Get null as date - this should throw or be unusable on the client side, depending on date representation @@ -943,7 +943,7 @@ def date_null( return client_raw_response def date_time_valid( - self, date_time_path, custom_headers={}, raw=False, **operation_config): + self, date_time_path, custom_headers=None, raw=False, **operation_config): """ Get '2012-01-01T01:01:01Z' as date-time @@ -986,7 +986,7 @@ def date_time_valid( return client_raw_response def date_time_null( - self, date_time_path, custom_headers={}, raw=False, **operation_config): + self, date_time_path, custom_headers=None, raw=False, **operation_config): """ Get null as date-time, should be disallowed or throw depending on representation of date-time @@ -1030,7 +1030,7 @@ def date_time_null( return client_raw_response def base64_url( - self, base64_url_path, custom_headers={}, raw=False, **operation_config): + self, base64_url_path, custom_headers=None, raw=False, **operation_config): """ Get 'lorem' encoded value as 'bG9yZW0' (base64url) @@ -1073,7 +1073,7 @@ def base64_url( return client_raw_response def array_csv_in_path( - self, array_path, custom_headers={}, raw=False, **operation_config): + self, array_path, custom_headers=None, raw=False, **operation_config): """ Get an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the csv-array format @@ -1118,7 +1118,7 @@ def array_csv_in_path( return client_raw_response def unix_time_url( - self, unix_time_url_path, custom_headers={}, raw=False, **operation_config): + self, unix_time_url_path, custom_headers=None, raw=False, **operation_config): """ Get the date 2016-04-13 encoded value as '1460505600' (Unix time) diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/operations/queries.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/operations/queries.py index b0e4ea1955..309ef289b5 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/operations/queries.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/operations/queries.py @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get_boolean_true( - self, bool_query=False, custom_headers={}, raw=False, **operation_config): + self, bool_query=False, custom_headers=None, raw=False, **operation_config): """ Get true Boolean value on path @@ -72,7 +72,7 @@ def get_boolean_true( return client_raw_response def get_boolean_false( - self, bool_query=False, custom_headers={}, raw=False, **operation_config): + self, bool_query=False, custom_headers=None, raw=False, **operation_config): """ Get false Boolean value on path @@ -112,7 +112,7 @@ def get_boolean_false( return client_raw_response def get_boolean_null( - self, bool_query=None, custom_headers={}, raw=False, **operation_config): + self, bool_query=None, custom_headers=None, raw=False, **operation_config): """ Get null Boolean value on query (query string should be absent) @@ -153,7 +153,7 @@ def get_boolean_null( return client_raw_response def get_int_one_million( - self, int_query=1000000, custom_headers={}, raw=False, **operation_config): + self, int_query=1000000, custom_headers=None, raw=False, **operation_config): """ Get '1000000' integer value @@ -193,7 +193,7 @@ def get_int_one_million( return client_raw_response def get_int_negative_one_million( - self, int_query=-1000000, custom_headers={}, raw=False, **operation_config): + self, int_query=-1000000, custom_headers=None, raw=False, **operation_config): """ Get '-1000000' integer value @@ -233,7 +233,7 @@ def get_int_negative_one_million( return client_raw_response def get_int_null( - self, int_query=None, custom_headers={}, raw=False, **operation_config): + self, int_query=None, custom_headers=None, raw=False, **operation_config): """ Get null integer value (no query parameter) @@ -274,7 +274,7 @@ def get_int_null( return client_raw_response def get_ten_billion( - self, long_query=10000000000, custom_headers={}, raw=False, **operation_config): + self, long_query=10000000000, custom_headers=None, raw=False, **operation_config): """ Get '10000000000' 64 bit integer value @@ -314,7 +314,7 @@ def get_ten_billion( return client_raw_response def get_negative_ten_billion( - self, long_query=-10000000000, custom_headers={}, raw=False, **operation_config): + self, long_query=-10000000000, custom_headers=None, raw=False, **operation_config): """ Get '-10000000000' 64 bit integer value @@ -354,7 +354,7 @@ def get_negative_ten_billion( return client_raw_response def get_long_null( - self, long_query=None, custom_headers={}, raw=False, **operation_config): + self, long_query=None, custom_headers=None, raw=False, **operation_config): """ Get 'null 64 bit integer value (no query param in uri) @@ -395,7 +395,7 @@ def get_long_null( return client_raw_response def float_scientific_positive( - self, float_query=1.034E+20, custom_headers={}, raw=False, **operation_config): + self, float_query=1.034E+20, custom_headers=None, raw=False, **operation_config): """ Get '1.034E+20' numeric value @@ -435,7 +435,7 @@ def float_scientific_positive( return client_raw_response def float_scientific_negative( - self, float_query=-1.034E-20, custom_headers={}, raw=False, **operation_config): + self, float_query=-1.034E-20, custom_headers=None, raw=False, **operation_config): """ Get '-1.034E-20' numeric value @@ -475,7 +475,7 @@ def float_scientific_negative( return client_raw_response def float_null( - self, float_query=None, custom_headers={}, raw=False, **operation_config): + self, float_query=None, custom_headers=None, raw=False, **operation_config): """ Get null numeric value (no query parameter) @@ -516,7 +516,7 @@ def float_null( return client_raw_response def double_decimal_positive( - self, double_query=9999999.999, custom_headers={}, raw=False, **operation_config): + self, double_query=9999999.999, custom_headers=None, raw=False, **operation_config): """ Get '9999999.999' numeric value @@ -556,7 +556,7 @@ def double_decimal_positive( return client_raw_response def double_decimal_negative( - self, double_query=-9999999.999, custom_headers={}, raw=False, **operation_config): + self, double_query=-9999999.999, custom_headers=None, raw=False, **operation_config): """ Get '-9999999.999' numeric value @@ -596,7 +596,7 @@ def double_decimal_negative( return client_raw_response def double_null( - self, double_query=None, custom_headers={}, raw=False, **operation_config): + self, double_query=None, custom_headers=None, raw=False, **operation_config): """ Get null numeric value (no query parameter) @@ -637,7 +637,7 @@ def double_null( return client_raw_response def string_unicode( - self, string_query="啊齄丂狛狜隣郎隣兀﨩", custom_headers={}, raw=False, **operation_config): + self, string_query="啊齄丂狛狜隣郎隣兀﨩", custom_headers=None, raw=False, **operation_config): """ Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value @@ -677,7 +677,7 @@ def string_unicode( return client_raw_response def string_url_encoded( - self, string_query="begin!*'();:@ &=+$,/?#[]end", custom_headers={}, raw=False, **operation_config): + self, string_query="begin!*'();:@ &=+$,/?#[]end", custom_headers=None, raw=False, **operation_config): """ Get 'begin!*'();:@ &=+$,/?#[]end @@ -718,7 +718,7 @@ def string_url_encoded( return client_raw_response def string_empty( - self, string_query="", custom_headers={}, raw=False, **operation_config): + self, string_query="", custom_headers=None, raw=False, **operation_config): """ Get '' @@ -758,7 +758,7 @@ def string_empty( return client_raw_response def string_null( - self, string_query=None, custom_headers={}, raw=False, **operation_config): + self, string_query=None, custom_headers=None, raw=False, **operation_config): """ Get null (no query parameter in url) @@ -799,7 +799,7 @@ def string_null( return client_raw_response def enum_valid( - self, enum_query=None, custom_headers={}, raw=False, **operation_config): + self, enum_query=None, custom_headers=None, raw=False, **operation_config): """ Get using uri with query parameter 'green color' @@ -842,7 +842,7 @@ def enum_valid( return client_raw_response def enum_null( - self, enum_query=None, custom_headers={}, raw=False, **operation_config): + self, enum_query=None, custom_headers=None, raw=False, **operation_config): """ Get null (no query parameter in url) @@ -885,7 +885,7 @@ def enum_null( return client_raw_response def byte_multi_byte( - self, byte_query=None, custom_headers={}, raw=False, **operation_config): + self, byte_query=None, custom_headers=None, raw=False, **operation_config): """ Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array @@ -927,7 +927,7 @@ def byte_multi_byte( return client_raw_response def byte_empty( - self, byte_query=bytearray("", encoding="utf-8"), custom_headers={}, raw=False, **operation_config): + self, byte_query=bytearray("", encoding="utf-8"), custom_headers=None, raw=False, **operation_config): """ Get '' as byte array @@ -967,7 +967,7 @@ def byte_empty( return client_raw_response def byte_null( - self, byte_query=None, custom_headers={}, raw=False, **operation_config): + self, byte_query=None, custom_headers=None, raw=False, **operation_config): """ Get null as byte array (no query parameters in uri) @@ -1008,7 +1008,7 @@ def byte_null( return client_raw_response def date_valid( - self, date_query, custom_headers={}, raw=False, **operation_config): + self, date_query, custom_headers=None, raw=False, **operation_config): """ Get '2012-01-01' as date @@ -1048,7 +1048,7 @@ def date_valid( return client_raw_response def date_null( - self, date_query=None, custom_headers={}, raw=False, **operation_config): + self, date_query=None, custom_headers=None, raw=False, **operation_config): """ Get null as date - this should result in no query parameters in uri @@ -1089,7 +1089,7 @@ def date_null( return client_raw_response def date_time_valid( - self, date_time_query, custom_headers={}, raw=False, **operation_config): + self, date_time_query, custom_headers=None, raw=False, **operation_config): """ Get '2012-01-01T01:01:01Z' as date-time @@ -1129,7 +1129,7 @@ def date_time_valid( return client_raw_response def date_time_null( - self, date_time_query=None, custom_headers={}, raw=False, **operation_config): + self, date_time_query=None, custom_headers=None, raw=False, **operation_config): """ Get null as date-time, should result in no query parameters in uri @@ -1170,7 +1170,7 @@ def date_time_null( return client_raw_response def array_string_csv_valid( - self, array_query=None, custom_headers={}, raw=False, **operation_config): + self, array_query=None, custom_headers=None, raw=False, **operation_config): """ Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the csv-array format @@ -1213,7 +1213,7 @@ def array_string_csv_valid( return client_raw_response def array_string_csv_null( - self, array_query=None, custom_headers={}, raw=False, **operation_config): + self, array_query=None, custom_headers=None, raw=False, **operation_config): """ Get a null array of string using the csv-array format @@ -1254,7 +1254,7 @@ def array_string_csv_null( return client_raw_response def array_string_csv_empty( - self, array_query=None, custom_headers={}, raw=False, **operation_config): + self, array_query=None, custom_headers=None, raw=False, **operation_config): """ Get an empty array [] of string using the csv-array format @@ -1296,7 +1296,7 @@ def array_string_csv_empty( return client_raw_response def array_string_ssv_valid( - self, array_query=None, custom_headers={}, raw=False, **operation_config): + self, array_query=None, custom_headers=None, raw=False, **operation_config): """ Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the ssv-array format @@ -1339,7 +1339,7 @@ def array_string_ssv_valid( return client_raw_response def array_string_tsv_valid( - self, array_query=None, custom_headers={}, raw=False, **operation_config): + self, array_query=None, custom_headers=None, raw=False, **operation_config): """ Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the tsv-array format @@ -1382,7 +1382,7 @@ def array_string_tsv_valid( return client_raw_response def array_string_pipes_valid( - self, array_query=None, custom_headers={}, raw=False, **operation_config): + self, array_query=None, custom_headers=None, raw=False, **operation_config): """ Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the pipes-array format diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Validation/autorestvalidationtest/auto_rest_validation_test.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Validation/autorestvalidationtest/auto_rest_validation_test.py index 328b2b4776..08b08680ce 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Validation/autorestvalidationtest/auto_rest_validation_test.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Validation/autorestvalidationtest/auto_rest_validation_test.py @@ -78,7 +78,7 @@ def __init__( def validation_of_method_parameters( - self, resource_group_name, id, custom_headers={}, raw=False, **operation_config): + self, resource_group_name, id, custom_headers=None, raw=False, **operation_config): """ Validates input parameters on the method. See swagger for details. @@ -135,7 +135,7 @@ def validation_of_method_parameters( return deserialized def validation_of_body( - self, resource_group_name, id, body=None, custom_headers={}, raw=False, **operation_config): + self, resource_group_name, id, body=None, custom_headers=None, raw=False, **operation_config): """ Validates body parameters on the method. See swagger for details. @@ -202,7 +202,7 @@ def validation_of_body( return deserialized def get_with_constant_in_path( - self, constant_param="constant", custom_headers={}, raw=False, **operation_config): + self, constant_param="constant", custom_headers=None, raw=False, **operation_config): """ :param constant_param: @@ -244,7 +244,7 @@ def get_with_constant_in_path( return client_raw_response def post_with_constant_in_body( - self, constant_param="constant", body=None, custom_headers={}, raw=False, **operation_config): + self, constant_param="constant", body=None, custom_headers=None, raw=False, **operation_config): """ :param constant_param: diff --git a/AutoRest/Generators/Python/Python/TemplateModels/MethodTemplateModel.cs b/AutoRest/Generators/Python/Python/TemplateModels/MethodTemplateModel.cs index 3ce192fdbb..f1c93804a1 100644 --- a/AutoRest/Generators/Python/Python/TemplateModels/MethodTemplateModel.cs +++ b/AutoRest/Generators/Python/Python/TemplateModels/MethodTemplateModel.cs @@ -181,7 +181,7 @@ public virtual string MethodParameterDeclaration(bool addCustomHeaderParameters) if (addCustomHeaderParameters) { - declarations.Add("custom_headers={}"); + declarations.Add("custom_headers=None"); } declarations.Add("raw=False");