diff --git a/AutoRest/Generators/Python/Python.Tests/AcceptanceTests/complex_tests.py b/AutoRest/Generators/Python/Python.Tests/AcceptanceTests/complex_tests.py index 2c1e91dd4e755..88d8e9ee7db3b 100644 --- a/AutoRest/Generators/Python/Python.Tests/AcceptanceTests/complex_tests.py +++ b/AutoRest/Generators/Python/Python.Tests/AcceptanceTests/complex_tests.py @@ -101,7 +101,7 @@ def test_complex(self): self.assertEqual(2, intResult.field2) # PUT primitive/integer - intRequest = IntWrapper(field1=-1, field2=2) + intRequest = {'field1':-1, 'field2':2} client.primitive.put_int(intRequest) # GET primitive/long @@ -110,7 +110,7 @@ def test_complex(self): self.assertEqual(-999511627788, longResult.field2) # PUT primitive/long - longRequest = LongWrapper(field1=1099511627775, field2=-999511627788) + longRequest = {'field1':1099511627775, 'field2':-999511627788} client.primitive.put_long(longRequest) # GET primitive/float @@ -128,8 +128,8 @@ def test_complex(self): self.assertEqual(-5e-57, doubleResult.field_56_zeros_after_the_dot_and_negative_zero_before_dot_and_this_is_a_long_field_name_on_purpose) # PUT primitive/double - doubleRequest = DoubleWrapper(field1=3e-100) - doubleRequest.field_56_zeros_after_the_dot_and_negative_zero_before_dot_and_this_is_a_long_field_name_on_purpose = -5e-57 + doubleRequest = {'field1':3e-100} + doubleRequest['field_56_zeros_after_the_dot_and_negative_zero_before_dot_and_this_is_a_long_field_name_on_purpose'] = -5e-57 client.primitive.put_double(doubleRequest); # GET primitive/bool @@ -269,14 +269,14 @@ def test_complex(self): self.assertEqual("Tomato", inheritanceResult.hates[1].name) # PUT inheritance/valid - request = Siamese( - id=2, - name="Siameeee", - color="green", - breed="persian", - hates=[Dog(id=1, name="Potato", food="tomato"), + request = { + 'id': 2, + 'name': "Siameeee", + 'color': "green", + 'breed': "persian", + 'hates': [Dog(id=1, name="Potato", food="tomato"), Dog(id=-1, name="Tomato", food="french fries")] - ) + } client.inheritance.put_valid(request) """ diff --git a/AutoRest/Generators/Python/Python.Tests/AcceptanceTests/model_flattening_tests.py b/AutoRest/Generators/Python/Python.Tests/AcceptanceTests/model_flattening_tests.py index bb79352d8d754..7a80a4f152e8c 100644 --- a/AutoRest/Generators/Python/Python.Tests/AcceptanceTests/model_flattening_tests.py +++ b/AutoRest/Generators/Python/Python.Tests/AcceptanceTests/model_flattening_tests.py @@ -84,11 +84,11 @@ def test_flattening_array(self): self.assertEqual("Resource3", result[2].name) resourceArray = [ - FlattenedProduct( - location = "West US", - tags = {"tag1":"value1", "tag2":"value3"}), - FlattenedProduct( - location = "Building 44")] + { + 'location': "West US", + 'tags': {"tag1":"value1", "tag2":"value3"}}, + { + 'location': "Building 44"}] self.client.put_array(resourceArray) @@ -117,15 +117,15 @@ def test_flattening_dictionary(self): self.assertEqual("Resource3", resultDictionary["Product3"].name) resourceDictionary = { - "Resource1": FlattenedProduct( - location = "West US", - tags = {"tag1":"value1", "tag2":"value3"}, - pname = "Product1", - flattened_product_type = "Flat"), - "Resource2": FlattenedProduct( - location = "Building 44", - pname = "Product2", - flattened_product_type = "Flat")} + "Resource1": { + 'location': "West US", + 'tags': {"tag1":"value1", "tag2":"value3"}, + 'pname': "Product1", + 'flattened_product_type': "Flat"}, + "Resource2": { + 'location': "Building 44", + 'pname': "Product2", + 'flattened_product_type': "Flat"}} self.client.put_dictionary(resourceDictionary)