@typespec/http-client-python 0.28.2 → 0.28.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/dist/emitter/code-model.d.ts.map +1 -1
  2. package/dist/emitter/code-model.js +6 -6
  3. package/dist/emitter/code-model.js.map +1 -1
  4. package/dist/emitter/emitter.d.ts.map +1 -1
  5. package/dist/emitter/emitter.js +27 -28
  6. package/dist/emitter/emitter.js.map +1 -1
  7. package/dist/emitter/lib.d.ts +4 -1
  8. package/dist/emitter/lib.d.ts.map +1 -1
  9. package/dist/emitter/lib.js.map +1 -1
  10. package/dist/emitter/system-requirements.js +6 -4
  11. package/dist/emitter/system-requirements.js.map +1 -1
  12. package/dist/emitter/types.d.ts +2 -5
  13. package/dist/emitter/types.d.ts.map +1 -1
  14. package/dist/emitter/types.js +55 -58
  15. package/dist/emitter/types.js.map +1 -1
  16. package/dist/emitter/utils.d.ts.map +1 -1
  17. package/dist/emitter/utils.js +16 -17
  18. package/dist/emitter/utils.js.map +1 -1
  19. package/emitter/src/code-model.ts +6 -13
  20. package/emitter/src/emitter.ts +29 -31
  21. package/emitter/src/lib.ts +4 -0
  22. package/emitter/src/system-requirements.ts +4 -4
  23. package/emitter/src/types.ts +67 -57
  24. package/emitter/src/utils.ts +16 -18
  25. package/emitter/temp/tsconfig.tsbuildinfo +1 -1
  26. package/eng/scripts/Build-Packages.ps1 +62 -37
  27. package/eng/scripts/Check-GitChanges.ps1 +30 -3
  28. package/eng/scripts/Functions.ps1 +54 -15
  29. package/eng/scripts/Generate.ps1 +42 -8
  30. package/eng/scripts/Generation.psm1 +44 -15
  31. package/eng/scripts/Initialize-Repository.ps1 +29 -11
  32. package/eng/scripts/Test-Packages.ps1 +47 -31
  33. package/eng/scripts/ci/config/eslint-ci.config.mjs +54 -0
  34. package/eng/scripts/ci/dev_requirements.txt +1 -0
  35. package/eng/scripts/ci/format.ts +232 -2
  36. package/eng/scripts/ci/lint.ts +216 -20
  37. package/eng/scripts/ci/regenerate-common.ts +18 -14
  38. package/eng/scripts/ci/regenerate.ts +305 -68
  39. package/eng/scripts/ci/run-tests.ts +402 -0
  40. package/eng/scripts/ci/run_mypy.py +4 -3
  41. package/eng/scripts/ci/run_pylint.py +4 -3
  42. package/eng/scripts/ci/run_pyright.py +4 -3
  43. package/eng/scripts/ci/typecheck.ts +225 -0
  44. package/eng/scripts/ci/util.py +1 -1
  45. package/eng/scripts/ci/utils.ts +5 -5
  46. package/eng/scripts/setup/__pycache__/package_manager.cpython-311.pyc +0 -0
  47. package/eng/scripts/setup/__pycache__/venvtools.cpython-311.pyc +0 -0
  48. package/eng/scripts/setup/build.ts +1 -1
  49. package/eng/scripts/setup/build_pygen_wheel.py +1 -0
  50. package/eng/scripts/setup/install.py +1 -0
  51. package/eng/scripts/setup/prepare.py +1 -0
  52. package/eng/scripts/setup/prepare.ts +1 -1
  53. package/eng/scripts/setup/run_tsp.py +3 -3
  54. package/eng/scripts/setup/system-requirements.ts +8 -4
  55. package/eng/scripts/setup/venvtools.py +1 -0
  56. package/generator/build/lib/pygen/codegen/templates/model_base.py.jinja2 +157 -64
  57. package/generator/dist/pygen-0.1.0-py3-none-any.whl +0 -0
  58. package/generator/pygen/codegen/templates/model_base.py.jinja2 +157 -64
  59. package/package.json +48 -42
  60. package/eng/scripts/ci/run-ci.ts +0 -89
  61. package/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_commonproperties_async.py +0 -94
  62. package/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_largeheader_async.py +0 -30
  63. package/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_nonresource_async.py +0 -36
  64. package/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_operationtemplates_async.py +0 -205
  65. package/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_resource_async.py +0 -478
  66. package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_access_async.py +0 -101
  67. package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_api_version_header_async.py +0 -18
  68. package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_api_version_path_async.py +0 -18
  69. package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_api_version_query_async.py +0 -18
  70. package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_client_default_value_async.py +0 -46
  71. package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_client_initialization_async.py +0 -58
  72. package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_client_location_async.py +0 -82
  73. package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_deserialize_empty_string_as_null_async.py +0 -20
  74. package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_flatten_async.py +0 -115
  75. package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_hierrarchy_building_async.py +0 -53
  76. package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_next_link_verb_async.py +0 -28
  77. package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_override_async.py +0 -106
  78. package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_usage_async.py +0 -38
  79. package/generator/test/azure/mock_api_tests/asynctests/test_azure_core_basic_async.py +0 -76
  80. package/generator/test/azure/mock_api_tests/asynctests/test_azure_core_lro_rpc_async.py +0 -22
  81. package/generator/test/azure/mock_api_tests/asynctests/test_azure_core_lro_standard_async.py +0 -39
  82. package/generator/test/azure/mock_api_tests/asynctests/test_azure_core_model_async.py +0 -33
  83. package/generator/test/azure/mock_api_tests/asynctests/test_azure_core_page_async.py +0 -80
  84. package/generator/test/azure/mock_api_tests/asynctests/test_azure_core_scalar_async.py +0 -41
  85. package/generator/test/azure/mock_api_tests/asynctests/test_azure_core_traits_async.py +0 -87
  86. package/generator/test/azure/mock_api_tests/asynctests/test_azure_encode_duration_async.py +0 -19
  87. package/generator/test/azure/mock_api_tests/asynctests/test_azure_example_basic_async.py +0 -30
  88. package/generator/test/azure/mock_api_tests/asynctests/test_azure_payload_pageable_async.py +0 -19
  89. package/generator/test/azure/mock_api_tests/asynctests/test_azure_resource_manager_method_subscription_id_async.py +0 -248
  90. package/generator/test/azure/mock_api_tests/asynctests/test_azure_resource_manager_multi_service_async.py +0 -110
  91. package/generator/test/azure/mock_api_tests/asynctests/test_azure_resource_manager_multi_service_shared_models_async.py +0 -132
  92. package/generator/test/azure/mock_api_tests/asynctests/test_azure_special_headers_client_request_id_async.py +0 -30
  93. package/generator/test/azure/mock_api_tests/asynctests/test_azure_versioning_previewversion_async.py +0 -53
  94. package/generator/test/azure/mock_api_tests/asynctests/test_client_namespace_async.py +0 -34
  95. package/generator/test/azure/mock_api_tests/asynctests/test_client_naming_async.py +0 -69
  96. package/generator/test/azure/mock_api_tests/asynctests/test_client_naming_enum_conflict_async.py +0 -37
  97. package/generator/test/azure/mock_api_tests/asynctests/test_client_overload_async.py +0 -27
  98. package/generator/test/azure/mock_api_tests/asynctests/test_client_structure_async.py +0 -64
  99. package/generator/test/azure/mock_api_tests/asynctests/test_client_structure_clientoperationgroup_async.py +0 -31
  100. package/generator/test/azure/mock_api_tests/asynctests/test_encode_duration_async.py +0 -63
  101. package/generator/test/azure/mock_api_tests/asynctests/test_encode_numeric_async.py +0 -35
  102. package/generator/test/azure/mock_api_tests/asynctests/test_parameters_basic_async.py +0 -24
  103. package/generator/test/azure/mock_api_tests/asynctests/test_parameters_spread_async.py +0 -76
  104. package/generator/test/azure/mock_api_tests/asynctests/test_payload_content_negotiation_async.py +0 -37
  105. package/generator/test/azure/mock_api_tests/asynctests/test_payload_multipart_async.py +0 -216
  106. package/generator/test/azure/mock_api_tests/asynctests/test_resiliency_srv_driven_async.py +0 -130
  107. package/generator/test/azure/mock_api_tests/asynctests/test_serialization_encoded_name_json_async.py +0 -24
  108. package/generator/test/azure/mock_api_tests/asynctests/test_service_multi_service_async.py +0 -31
  109. package/generator/test/azure/mock_api_tests/asynctests/test_special_words_async.py +0 -71
  110. package/generator/test/azure/mock_api_tests/conftest.py +0 -207
  111. package/generator/test/azure/mock_api_tests/data/image.jpg +0 -0
  112. package/generator/test/azure/mock_api_tests/data/image.png +0 -0
  113. package/generator/test/azure/mock_api_tests/test_azure_arm_commonproperties.py +0 -89
  114. package/generator/test/azure/mock_api_tests/test_azure_arm_largeheader.py +0 -27
  115. package/generator/test/azure/mock_api_tests/test_azure_arm_nonresource.py +0 -34
  116. package/generator/test/azure/mock_api_tests/test_azure_arm_operationtemplates.py +0 -180
  117. package/generator/test/azure/mock_api_tests/test_azure_arm_resource.py +0 -436
  118. package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_access.py +0 -92
  119. package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_api_version_header.py +0 -17
  120. package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_api_version_path.py +0 -17
  121. package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_api_version_query.py +0 -17
  122. package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_client_default_value.py +0 -42
  123. package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_client_initialization.py +0 -51
  124. package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_client_location.py +0 -70
  125. package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_deserialize_empty_string_as_null.py +0 -19
  126. package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_flatten.py +0 -104
  127. package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_hierrarchy_building.py +0 -45
  128. package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_next_link_verb.py +0 -27
  129. package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_override.py +0 -102
  130. package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_usage.py +0 -32
  131. package/generator/test/azure/mock_api_tests/test_azure_core_basic.py +0 -70
  132. package/generator/test/azure/mock_api_tests/test_azure_core_lro_rpc.py +0 -20
  133. package/generator/test/azure/mock_api_tests/test_azure_core_lro_standard.py +0 -32
  134. package/generator/test/azure/mock_api_tests/test_azure_core_model.py +0 -30
  135. package/generator/test/azure/mock_api_tests/test_azure_core_page.py +0 -71
  136. package/generator/test/azure/mock_api_tests/test_azure_core_scalar.py +0 -35
  137. package/generator/test/azure/mock_api_tests/test_azure_core_traits.py +0 -85
  138. package/generator/test/azure/mock_api_tests/test_azure_encode_duration.py +0 -18
  139. package/generator/test/azure/mock_api_tests/test_azure_example_basic.py +0 -29
  140. package/generator/test/azure/mock_api_tests/test_azure_payload_pageable.py +0 -18
  141. package/generator/test/azure/mock_api_tests/test_azure_resource_manager_method_subscription_id.py +0 -235
  142. package/generator/test/azure/mock_api_tests/test_azure_resource_manager_multi_service.py +0 -104
  143. package/generator/test/azure/mock_api_tests/test_azure_resource_manager_multi_service_shared_models.py +0 -128
  144. package/generator/test/azure/mock_api_tests/test_azure_special_headers_client_request_id.py +0 -29
  145. package/generator/test/azure/mock_api_tests/test_azure_versioning_previewversion.py +0 -50
  146. package/generator/test/azure/mock_api_tests/test_clear_output_folder.py +0 -23
  147. package/generator/test/azure/mock_api_tests/test_client_namespace.py +0 -32
  148. package/generator/test/azure/mock_api_tests/test_client_naming.py +0 -57
  149. package/generator/test/azure/mock_api_tests/test_client_naming_enum_conflict.py +0 -35
  150. package/generator/test/azure/mock_api_tests/test_client_overload.py +0 -25
  151. package/generator/test/azure/mock_api_tests/test_client_structure.py +0 -60
  152. package/generator/test/azure/mock_api_tests/test_client_structure_clientoperationgroup.py +0 -29
  153. package/generator/test/azure/mock_api_tests/test_encode_duration.py +0 -60
  154. package/generator/test/azure/mock_api_tests/test_encode_numeric.py +0 -31
  155. package/generator/test/azure/mock_api_tests/test_model_base_flatten_compatibility.py +0 -251
  156. package/generator/test/azure/mock_api_tests/test_parameters_basic.py +0 -22
  157. package/generator/test/azure/mock_api_tests/test_parameters_spread.py +0 -66
  158. package/generator/test/azure/mock_api_tests/test_payload_content_negotiation.py +0 -33
  159. package/generator/test/azure/mock_api_tests/test_payload_multipart.py +0 -198
  160. package/generator/test/azure/mock_api_tests/test_resiliency_srv_driven.py +0 -124
  161. package/generator/test/azure/mock_api_tests/test_serialization_encoded_name_json.py +0 -21
  162. package/generator/test/azure/mock_api_tests/test_service_multi_service.py +0 -29
  163. package/generator/test/azure/mock_api_tests/test_special_words.py +0 -63
  164. package/generator/test/azure/requirements.txt +0 -125
  165. package/generator/test/azure/tox.ini +0 -64
  166. package/generator/test/data/image.jpg +0 -0
  167. package/generator/test/data/image.png +0 -0
  168. package/generator/test/dev_requirements.txt +0 -8
  169. package/generator/test/generic_mock_api_tests/asynctests/test_authentication_async.py +0 -140
  170. package/generator/test/generic_mock_api_tests/asynctests/test_encode_array_async.py +0 -139
  171. package/generator/test/generic_mock_api_tests/asynctests/test_encode_bytes_async.py +0 -132
  172. package/generator/test/generic_mock_api_tests/asynctests/test_encode_datetime_async.py +0 -127
  173. package/generator/test/generic_mock_api_tests/asynctests/test_headasboolean_async.py +0 -35
  174. package/generator/test/generic_mock_api_tests/asynctests/test_parameters_body_optionality_async.py +0 -30
  175. package/generator/test/generic_mock_api_tests/asynctests/test_parameters_collection_format_async.py +0 -38
  176. package/generator/test/generic_mock_api_tests/asynctests/test_parameters_path_async.py +0 -24
  177. package/generator/test/generic_mock_api_tests/asynctests/test_parameters_query_async.py +0 -18
  178. package/generator/test/generic_mock_api_tests/asynctests/test_payload_json_merge_patch_async.py +0 -98
  179. package/generator/test/generic_mock_api_tests/asynctests/test_payload_media_type_async.py +0 -27
  180. package/generator/test/generic_mock_api_tests/asynctests/test_payload_pageable_async.py +0 -134
  181. package/generator/test/generic_mock_api_tests/asynctests/test_payload_xml_async.py +0 -150
  182. package/generator/test/generic_mock_api_tests/asynctests/test_response_status_code_range_async.py +0 -38
  183. package/generator/test/generic_mock_api_tests/asynctests/test_routes_async.py +0 -331
  184. package/generator/test/generic_mock_api_tests/asynctests/test_server_endpoint_not_defined_async.py +0 -18
  185. package/generator/test/generic_mock_api_tests/asynctests/test_server_path_multiple_async.py +0 -25
  186. package/generator/test/generic_mock_api_tests/asynctests/test_server_path_single_async.py +0 -18
  187. package/generator/test/generic_mock_api_tests/asynctests/test_server_versions_not_versioned_async.py +0 -28
  188. package/generator/test/generic_mock_api_tests/asynctests/test_server_versions_versioned_async.py +0 -34
  189. package/generator/test/generic_mock_api_tests/asynctests/test_special_headers_conditional_request_async.py +0 -38
  190. package/generator/test/generic_mock_api_tests/asynctests/test_special_headers_repeatability_async.py +0 -19
  191. package/generator/test/generic_mock_api_tests/asynctests/test_specs_documentation_async.py +0 -59
  192. package/generator/test/generic_mock_api_tests/asynctests/test_streaming_jsonl_async.py +0 -27
  193. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_array_async.py +0 -127
  194. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_dictionary_async.py +0 -98
  195. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_enum_extensible_async.py +0 -25
  196. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_enum_fixed_async.py +0 -27
  197. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_file_async.py +0 -59
  198. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_empty_async.py +0 -32
  199. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_enum_discriminator_async.py +0 -70
  200. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_nested_discriminator_async.py +0 -85
  201. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_not_discriminated_async.py +0 -34
  202. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_recursive_async.py +0 -34
  203. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_single_discriminator_async.py +0 -67
  204. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_usage_async.py +0 -32
  205. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_visibility_async.py +0 -47
  206. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_property_additionalproperties_async.py +0 -353
  207. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_property_nullable_async.py +0 -110
  208. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_property_optional_async.py +0 -197
  209. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_property_valuetypes_async.py +0 -315
  210. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_scalar_async.py +0 -60
  211. package/generator/test/generic_mock_api_tests/asynctests/test_typetest_union_async.py +0 -90
  212. package/generator/test/generic_mock_api_tests/asynctests/test_versioning_added_async.py +0 -36
  213. package/generator/test/generic_mock_api_tests/asynctests/test_versioning_made_optional_async.py +0 -21
  214. package/generator/test/generic_mock_api_tests/asynctests/test_versioning_removed_async.py +0 -39
  215. package/generator/test/generic_mock_api_tests/asynctests/test_versioning_renamed_from_async.py +0 -29
  216. package/generator/test/generic_mock_api_tests/asynctests/test_versioning_return_type_changed_from_async.py +0 -18
  217. package/generator/test/generic_mock_api_tests/asynctests/test_versioning_type_changed_from_async.py +0 -22
  218. package/generator/test/generic_mock_api_tests/conftest.py +0 -75
  219. package/generator/test/generic_mock_api_tests/data/image.jpg +0 -0
  220. package/generator/test/generic_mock_api_tests/data/image.png +0 -0
  221. package/generator/test/generic_mock_api_tests/test_authentication.py +0 -130
  222. package/generator/test/generic_mock_api_tests/test_encode_array.py +0 -126
  223. package/generator/test/generic_mock_api_tests/test_encode_bytes.py +0 -128
  224. package/generator/test/generic_mock_api_tests/test_encode_datetime.py +0 -123
  225. package/generator/test/generic_mock_api_tests/test_headasboolean.py +0 -33
  226. package/generator/test/generic_mock_api_tests/test_parameters_body_optionality.py +0 -27
  227. package/generator/test/generic_mock_api_tests/test_parameters_collection_format.py +0 -33
  228. package/generator/test/generic_mock_api_tests/test_parameters_path.py +0 -22
  229. package/generator/test/generic_mock_api_tests/test_parameters_query.py +0 -17
  230. package/generator/test/generic_mock_api_tests/test_payload_json_merge_patch.py +0 -93
  231. package/generator/test/generic_mock_api_tests/test_payload_media_type.py +0 -25
  232. package/generator/test/generic_mock_api_tests/test_payload_pageable.py +0 -99
  233. package/generator/test/generic_mock_api_tests/test_payload_xml.py +0 -135
  234. package/generator/test/generic_mock_api_tests/test_response_status_code_range.py +0 -36
  235. package/generator/test/generic_mock_api_tests/test_routes.py +0 -285
  236. package/generator/test/generic_mock_api_tests/test_server_endpoint_not_defined.py +0 -17
  237. package/generator/test/generic_mock_api_tests/test_server_path_multiple.py +0 -21
  238. package/generator/test/generic_mock_api_tests/test_server_path_single.py +0 -17
  239. package/generator/test/generic_mock_api_tests/test_server_versions_not_versioned.py +0 -25
  240. package/generator/test/generic_mock_api_tests/test_server_versions_versioned.py +0 -30
  241. package/generator/test/generic_mock_api_tests/test_special_headers_conditional_request.py +0 -34
  242. package/generator/test/generic_mock_api_tests/test_special_headers_repeatability.py +0 -18
  243. package/generator/test/generic_mock_api_tests/test_specs_documentation.py +0 -51
  244. package/generator/test/generic_mock_api_tests/test_streaming_jsonl.py +0 -25
  245. package/generator/test/generic_mock_api_tests/test_typetest_array.py +0 -111
  246. package/generator/test/generic_mock_api_tests/test_typetest_dictionary.py +0 -86
  247. package/generator/test/generic_mock_api_tests/test_typetest_enum_extensible.py +0 -23
  248. package/generator/test/generic_mock_api_tests/test_typetest_enum_fixed.py +0 -25
  249. package/generator/test/generic_mock_api_tests/test_typetest_file.py +0 -52
  250. package/generator/test/generic_mock_api_tests/test_typetest_model_empty.py +0 -29
  251. package/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_enum_discriminator.py +0 -58
  252. package/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_nested_discriminator.py +0 -79
  253. package/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_not_discriminated.py +0 -31
  254. package/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_recursive.py +0 -32
  255. package/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_single_discriminator.py +0 -60
  256. package/generator/test/generic_mock_api_tests/test_typetest_model_usage.py +0 -28
  257. package/generator/test/generic_mock_api_tests/test_typetest_model_visibility.py +0 -40
  258. package/generator/test/generic_mock_api_tests/test_typetest_property_additionalproperties.py +0 -314
  259. package/generator/test/generic_mock_api_tests/test_typetest_property_nullable.py +0 -102
  260. package/generator/test/generic_mock_api_tests/test_typetest_property_optional.py +0 -174
  261. package/generator/test/generic_mock_api_tests/test_typetest_property_valuetypes.py +0 -286
  262. package/generator/test/generic_mock_api_tests/test_typetest_scalar.py +0 -53
  263. package/generator/test/generic_mock_api_tests/test_typetest_union.py +0 -80
  264. package/generator/test/generic_mock_api_tests/test_typetest_union_discriminated.py +0 -290
  265. package/generator/test/generic_mock_api_tests/test_versioning_added.py +0 -33
  266. package/generator/test/generic_mock_api_tests/test_versioning_made_optional.py +0 -20
  267. package/generator/test/generic_mock_api_tests/test_versioning_removed.py +0 -37
  268. package/generator/test/generic_mock_api_tests/test_versioning_renamed_from.py +0 -27
  269. package/generator/test/generic_mock_api_tests/test_versioning_return_type_changed_from.py +0 -17
  270. package/generator/test/generic_mock_api_tests/test_versioning_type_changed_from.py +0 -21
  271. package/generator/test/unbranded/mock_api_tests/asynctests/test_auth_flow_async.py +0 -19
  272. package/generator/test/unbranded/mock_api_tests/asynctests/test_encode_duration_async.py +0 -63
  273. package/generator/test/unbranded/mock_api_tests/asynctests/test_encode_numeric_async.py +0 -35
  274. package/generator/test/unbranded/mock_api_tests/asynctests/test_parameters_basic_async.py +0 -24
  275. package/generator/test/unbranded/mock_api_tests/asynctests/test_parameters_spread_async.py +0 -76
  276. package/generator/test/unbranded/mock_api_tests/asynctests/test_payload_content_negotiation_async.py +0 -37
  277. package/generator/test/unbranded/mock_api_tests/asynctests/test_payload_multipart_async.py +0 -218
  278. package/generator/test/unbranded/mock_api_tests/asynctests/test_serialization_encoded_name_json_async.py +0 -24
  279. package/generator/test/unbranded/mock_api_tests/asynctests/test_special_words_async.py +0 -73
  280. package/generator/test/unbranded/mock_api_tests/asynctests/test_unbranded_async.py +0 -24
  281. package/generator/test/unbranded/mock_api_tests/conftest.py +0 -91
  282. package/generator/test/unbranded/mock_api_tests/data/image.jpg +0 -0
  283. package/generator/test/unbranded/mock_api_tests/data/image.png +0 -0
  284. package/generator/test/unbranded/mock_api_tests/test_auth_flow.py +0 -17
  285. package/generator/test/unbranded/mock_api_tests/test_encode_duration.py +0 -60
  286. package/generator/test/unbranded/mock_api_tests/test_encode_numeric.py +0 -32
  287. package/generator/test/unbranded/mock_api_tests/test_parameters_basic.py +0 -22
  288. package/generator/test/unbranded/mock_api_tests/test_parameters_spread.py +0 -66
  289. package/generator/test/unbranded/mock_api_tests/test_payload_content_negotiation.py +0 -33
  290. package/generator/test/unbranded/mock_api_tests/test_payload_multipart.py +0 -200
  291. package/generator/test/unbranded/mock_api_tests/test_serialization_encoded_name_json.py +0 -22
  292. package/generator/test/unbranded/mock_api_tests/test_special_words.py +0 -66
  293. package/generator/test/unbranded/mock_api_tests/test_unbranded.py +0 -65
  294. package/generator/test/unbranded/requirements.txt +0 -69
  295. package/generator/test/unbranded/tox.ini +0 -64
  296. package/generator/test/unittests/conftest.py +0 -15
  297. package/generator/test/unittests/requirements.txt +0 -3
  298. package/generator/test/unittests/test_enums.py +0 -89
  299. package/generator/test/unittests/test_model_base_serialization.py +0 -4906
  300. package/generator/test/unittests/test_model_base_xml_serialization.py +0 -1239
  301. package/generator/test/unittests/test_name_converter.py +0 -35
  302. package/generator/test/unittests/test_optional_return_type.py +0 -268
  303. package/generator/test/unittests/test_parameter_ordering.py +0 -104
  304. package/generator/test/unittests/test_sort_schema.py +0 -93
  305. package/generator/test/unittests/tox.ini +0 -5
  306. /package/eng/scripts/ci/{mypy.ini → config/mypy.ini} +0 -0
  307. /package/eng/scripts/ci/{pylintrc → config/pylintrc} +0 -0
  308. /package/eng/scripts/ci/{pyproject.toml → config/pyproject.toml} +0 -0
  309. /package/eng/scripts/ci/{pyrightconfig.json → config/pyrightconfig.json} +0 -0
@@ -1,285 +0,0 @@
1
- # -------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for
4
- # license information.
5
- # --------------------------------------------------------------------------
6
- import pytest
7
- from routes import RoutesClient
8
-
9
-
10
- @pytest.fixture
11
- def client():
12
- with RoutesClient() as client:
13
- yield client
14
-
15
-
16
- def test_fixed(client: RoutesClient):
17
- client.fixed()
18
-
19
-
20
- def test_in_interface_fixed(client: RoutesClient):
21
- client.in_interface.fixed()
22
-
23
-
24
- def test_path_parameters_template_only(client: RoutesClient):
25
- client.path_parameters.template_only(
26
- param="a",
27
- )
28
-
29
-
30
- def test_path_parameters_explicit(client: RoutesClient):
31
- client.path_parameters.explicit(
32
- param="a",
33
- )
34
-
35
-
36
- def test_path_parameters_annotation_only(client: RoutesClient):
37
- client.path_parameters.annotation_only(
38
- param="a",
39
- )
40
-
41
-
42
- def test_path_parameters_reserved_expansion_template(client: RoutesClient):
43
- client.path_parameters.reserved_expansion.template(
44
- param="foo/bar baz",
45
- )
46
-
47
-
48
- def test_path_parameters_reserved_expansion_annotation(client: RoutesClient):
49
- client.path_parameters.reserved_expansion.annotation(
50
- param="foo/bar baz",
51
- )
52
-
53
-
54
- # def test_path_parameters_simple_expansion_standard_primitive(client: RoutesClient):
55
- # client.path_parameters.simple_expansion.standard.primitive(
56
- # param="a",
57
- # )
58
-
59
-
60
- # def test_path_parameters_simple_expansion_standard_array(client: RoutesClient):
61
- # client.path_parameters.simple_expansion.standard.array(
62
- # param=["a", "b"],
63
- # )
64
-
65
-
66
- # def test_path_parameters_simple_expansion_standard_record(client: RoutesClient):
67
- # client.path_parameters.simple_expansion.standard.record(
68
- # param={"a": 1, "b": 2},
69
- # )
70
-
71
-
72
- # def test_path_parameters_simple_expansion_explode_primitive(client: RoutesClient):
73
- # client.path_parameters.simple_expansion.explode.primitive(
74
- # param="a",
75
- # )
76
-
77
-
78
- # def test_path_parameters_simple_expansion_explode_array(client: RoutesClient):
79
- # client.path_parameters.simple_expansion.explode.array(
80
- # param=["a", "b"],
81
- # )
82
-
83
-
84
- # def test_path_parameters_simple_expansion_explode_record(client: RoutesClient):
85
- # client.path_parameters.simple_expansion.explode.record(
86
- # param={"a": 1, "b": 2},
87
- # )
88
-
89
-
90
- # def test_path_parameters_path_expansion_standard_primitive(client: RoutesClient):
91
- # client.path_parameters.path_expansion.standard.primitive(
92
- # param="a",
93
- # )
94
-
95
-
96
- # def test_path_parameters_path_expansion_standard_array(client: RoutesClient):
97
- # client.path_parameters.path_expansion.standard.array(
98
- # param=["a", "b"],
99
- # )
100
-
101
-
102
- # def test_path_parameters_path_expansion_standard_record(client: RoutesClient):
103
- # client.path_parameters.path_expansion.standard.record(
104
- # param={"a": 1, "b": 2},
105
- # )
106
-
107
-
108
- # def test_path_parameters_path_expansion_explode_primitive(client: RoutesClient):
109
- # client.path_parameters.path_expansion.explode.primitive(
110
- # param="a",
111
- # )
112
-
113
-
114
- # def test_path_parameters_path_expansion_explode_array(client: RoutesClient):
115
- # client.path_parameters.path_expansion.explode.array(
116
- # param=["a", "b"],
117
- # )
118
-
119
-
120
- # def test_path_parameters_path_expansion_explode_record(client: RoutesClient):
121
- # client.path_parameters.path_expansion.explode.record(
122
- # param={"a": 1, "b": 2},
123
- # )
124
-
125
-
126
- # def test_path_parameters_label_expansion_standard_primitive(client: RoutesClient):
127
- # client.path_parameters.label_expansion.standard.primitive(
128
- # param="a",
129
- # )
130
-
131
-
132
- # def test_path_parameters_label_expansion_standard_array(client: RoutesClient):
133
- # client.path_parameters.label_expansion.standard.array(
134
- # param=["a", "b"],
135
- # )
136
-
137
-
138
- # def test_path_parameters_label_expansion_standard_record(client: RoutesClient):
139
- # client.path_parameters.label_expansion.standard.record(
140
- # param={"a": 1, "b": 2},
141
- # )
142
-
143
-
144
- # def test_path_parameters_label_expansion_explode_primitive(client: RoutesClient):
145
- # client.path_parameters.label_expansion.explode.primitive(
146
- # param="a",
147
- # )
148
-
149
-
150
- # def test_path_parameters_label_expansion_explode_array(client: RoutesClient):
151
- # client.path_parameters.label_expansion.explode.array(
152
- # param=["a", "b"],
153
- # )
154
-
155
-
156
- # def test_path_parameters_label_expansion_explode_record(client: RoutesClient):
157
- # client.path_parameters.label_expansion.explode.record(
158
- # param={"a": 1, "b": 2},
159
- # )
160
-
161
-
162
- # def test_path_parameters_matrix_expansion_standard_primitive(client: RoutesClient):
163
- # client.path_parameters.matrix_expansion.standard.primitive(
164
- # param="a",
165
- # )
166
-
167
-
168
- # def test_path_parameters_matrix_expansion_standard_array(client: RoutesClient):
169
- # client.path_parameters.matrix_expansion.standard.array(
170
- # param=["a", "b"],
171
- # )
172
-
173
-
174
- # def test_path_parameters_matrix_expansion_standard_record(client: RoutesClient):
175
- # client.path_parameters.matrix_expansion.standard.record(
176
- # param={"a": 1, "b": 2},
177
- # )
178
-
179
-
180
- # def test_path_parameters_matrix_expansion_explode_primitive(client: RoutesClient):
181
- # client.path_parameters.matrix_expansion.explode.primitive(
182
- # param="a",
183
- # )
184
-
185
-
186
- # def test_path_parameters_matrix_expansion_explode_array(client: RoutesClient):
187
- # client.path_parameters.matrix_expansion.explode.array(
188
- # param=["a", "b"],
189
- # )
190
-
191
-
192
- # def test_path_parameters_matrix_expansion_explode_record(client: RoutesClient):
193
- # client.path_parameters.matrix_expansion.explode.record(
194
- # param={"a": 1, "b": 2},
195
- # )
196
-
197
-
198
- def test_query_parameters_template_only(client: RoutesClient):
199
- client.query_parameters.template_only(
200
- param="a",
201
- )
202
-
203
-
204
- def test_query_parameters_explicit(client: RoutesClient):
205
- client.query_parameters.explicit(
206
- param="a",
207
- )
208
-
209
-
210
- def test_query_parameters_annotation_only(client: RoutesClient):
211
- client.query_parameters.annotation_only(
212
- param="a",
213
- )
214
-
215
-
216
- def test_query_parameters_query_expansion_standard_primitive(client: RoutesClient):
217
- client.query_parameters.query_expansion.standard.primitive(
218
- param="a",
219
- )
220
-
221
-
222
- # def test_query_parameters_query_expansion_standard_array(client: RoutesClient):
223
- # client.query_parameters.query_expansion.standard.array(
224
- # param=["a", "b"],
225
- # )
226
-
227
-
228
- # def test_query_parameters_query_expansion_standard_record(client: RoutesClient):
229
- # client.query_parameters.query_expansion.standard.record(
230
- # param={"a": 1, "b": 2},
231
- # )
232
-
233
-
234
- def test_query_parameters_query_expansion_explode_primitive(client: RoutesClient):
235
- client.query_parameters.query_expansion.explode.primitive(
236
- param="a",
237
- )
238
-
239
-
240
- # def test_query_parameters_query_expansion_explode_array(client: RoutesClient):
241
- # client.query_parameters.query_expansion.explode.array(
242
- # param=["a", "b"],
243
- # )
244
-
245
-
246
- # def test_query_parameters_query_expansion_explode_record(client: RoutesClient):
247
- # client.query_parameters.query_expansion.explode.record(
248
- # param={"a": 1, "b": 2},
249
- # )
250
-
251
-
252
- def test_query_parameters_query_continuation_standard_primitive(client: RoutesClient):
253
- client.query_parameters.query_continuation.standard.primitive(
254
- param="a",
255
- )
256
-
257
-
258
- # def test_query_parameters_query_continuation_standard_array(client: RoutesClient):
259
- # client.query_parameters.query_continuation.standard.array(
260
- # param=["a", "b"],
261
- # )
262
-
263
-
264
- # def test_query_parameters_query_continuation_standard_record(client: RoutesClient):
265
- # client.query_parameters.query_continuation.standard.record(
266
- # param={"a": 1, "b": 2},
267
- # )
268
-
269
-
270
- def test_query_parameters_query_continuation_explode_primitive(client: RoutesClient):
271
- client.query_parameters.query_continuation.explode.primitive(
272
- param="a",
273
- )
274
-
275
-
276
- # def test_query_parameters_query_continuation_explode_array(client: RoutesClient):
277
- # client.query_parameters.query_continuation.explode.array(
278
- # param=["a", "b"],
279
- # )
280
-
281
-
282
- # def test_query_parameters_query_continuation_explode_record(client: RoutesClient):
283
- # client.query_parameters.query_continuation.explode.record(
284
- # param={"a": 1, "b": 2},
285
- # )
@@ -1,17 +0,0 @@
1
- # -------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for
4
- # license information.
5
- # --------------------------------------------------------------------------
6
- import pytest
7
- from server.endpoint.notdefined import NotDefinedClient
8
-
9
-
10
- @pytest.fixture
11
- def client():
12
- with NotDefinedClient(endpoint="http://localhost:3000") as client:
13
- yield client
14
-
15
-
16
- def test_valid(client: NotDefinedClient):
17
- assert client.valid() is True
@@ -1,21 +0,0 @@
1
- # -------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for
4
- # license information.
5
- # --------------------------------------------------------------------------
6
- import pytest
7
- from server.path.multiple import MultipleClient
8
-
9
-
10
- @pytest.fixture
11
- def client():
12
- with MultipleClient(endpoint="http://localhost:3000") as client:
13
- yield client
14
-
15
-
16
- def test_no_operation_params(client: MultipleClient):
17
- client.no_operation_params()
18
-
19
-
20
- def test_with_operation_path_param(client: MultipleClient):
21
- client.with_operation_path_param(keyword="test")
@@ -1,17 +0,0 @@
1
- # -------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for
4
- # license information.
5
- # --------------------------------------------------------------------------
6
- import pytest
7
- from server.path.single import SingleClient
8
-
9
-
10
- @pytest.fixture
11
- def client():
12
- with SingleClient(endpoint="http://localhost:3000") as client:
13
- yield client
14
-
15
-
16
- def test_my_op(client):
17
- assert client.my_op() is True
@@ -1,25 +0,0 @@
1
- # -------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for
4
- # license information.
5
- # --------------------------------------------------------------------------
6
- import pytest
7
- from server.versions.notversioned import NotVersionedClient
8
-
9
-
10
- @pytest.fixture
11
- def client():
12
- with NotVersionedClient(endpoint="http://localhost:3000") as client:
13
- yield client
14
-
15
-
16
- def test_without_api_version(client: NotVersionedClient):
17
- client.without_api_version()
18
-
19
-
20
- def test_with_query_api_version(client: NotVersionedClient):
21
- client.with_query_api_version(api_version="v1.0")
22
-
23
-
24
- def test_with_path_api_version(client: NotVersionedClient):
25
- client.with_path_api_version(api_version="v1.0")
@@ -1,30 +0,0 @@
1
- # -------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for
4
- # license information.
5
- # --------------------------------------------------------------------------
6
- import pytest
7
- from server.versions.versioned import VersionedClient
8
-
9
-
10
- @pytest.fixture
11
- def client():
12
- with VersionedClient(endpoint="http://localhost:3000") as client:
13
- yield client
14
-
15
-
16
- def test_without_api_version(client: VersionedClient):
17
- client.without_api_version()
18
-
19
-
20
- def test_with_query_api_version(client: VersionedClient):
21
- client.with_query_api_version()
22
-
23
-
24
- def test_with_path_api_version(client: VersionedClient):
25
- client.with_path_api_version()
26
-
27
-
28
- def test_with_query_old_api_version():
29
- with VersionedClient(endpoint="http://localhost:3000", api_version="2021-01-01-preview") as client:
30
- client.with_query_old_api_version()
@@ -1,34 +0,0 @@
1
- # -------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for
4
- # license information.
5
- # --------------------------------------------------------------------------
6
- import pytest
7
- import datetime
8
- from specialheaders.conditionalrequest import ConditionalRequestClient
9
-
10
-
11
- @pytest.fixture
12
- def client():
13
- with ConditionalRequestClient() as client:
14
- yield client
15
-
16
-
17
- def test_post_if_match(core_library, client: ConditionalRequestClient):
18
- client.post_if_match(etag="valid", match_condition=core_library.MatchConditions.IfNotModified)
19
-
20
-
21
- def test_post_if_none_match(core_library, client: ConditionalRequestClient):
22
- client.post_if_none_match(etag="invalid", match_condition=core_library.MatchConditions.IfModified)
23
-
24
-
25
- def test_head_if_modified_since(client: ConditionalRequestClient):
26
- client.head_if_modified_since(
27
- if_modified_since=datetime.datetime(2022, 8, 26, 14, 38, 0, tzinfo=datetime.timezone.utc)
28
- )
29
-
30
-
31
- def test_post_if_unmodified_since(client: ConditionalRequestClient):
32
- client.post_if_unmodified_since(
33
- if_unmodified_since=datetime.datetime(2022, 8, 26, 14, 38, 0, tzinfo=datetime.timezone.utc)
34
- )
@@ -1,18 +0,0 @@
1
- # -------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for
4
- # license information.
5
- # --------------------------------------------------------------------------
6
- import pytest
7
- from specialheaders.repeatability import RepeatabilityClient
8
-
9
-
10
- @pytest.fixture
11
- def client():
12
- with RepeatabilityClient() as client:
13
- yield client
14
-
15
-
16
- def test_immediate_success(client: RepeatabilityClient):
17
- cls = lambda x, y, z: z
18
- assert client.immediate_success(cls=cls)["Repeatability-Result"] == "accepted"
@@ -1,51 +0,0 @@
1
- # -------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for
4
- # license information.
5
- # --------------------------------------------------------------------------
6
-
7
- import pytest
8
- from specs.documentation import DocumentationClient, models
9
-
10
-
11
- @pytest.fixture
12
- def client():
13
- with DocumentationClient(endpoint="http://localhost:3000") as client:
14
- yield client
15
-
16
-
17
- class TestLists:
18
- def test_bullet_points_op(self, client: DocumentationClient):
19
- # GET /documentation/lists/bullet-points/op
20
- # Expected: 204 No Content
21
- client.lists.bullet_points_op()
22
-
23
- def test_bullet_points_model(self, client: DocumentationClient):
24
- # POST /documentation/lists/bullet-points/model
25
- # Expected: 200 OK
26
- client.lists.bullet_points_model(input=models.BulletPointsModel(prop="Simple"))
27
-
28
- # Also test with JSON
29
- client.lists.bullet_points_model(body={"input": {"prop": "Simple"}})
30
-
31
- def test_numbered(self, client: DocumentationClient):
32
- # GET /documentation/lists/numbered
33
- # Expected: 204 No Content
34
- client.lists.numbered()
35
-
36
-
37
- class TestTextFormatting:
38
- def test_bold_text(self, client: DocumentationClient):
39
- # GET /documentation/text-formatting/bold
40
- # Expected: 204 No Content
41
- client.text_formatting.bold_text()
42
-
43
- def test_italic_text(self, client: DocumentationClient):
44
- # GET /documentation/text-formatting/italic
45
- # Expected: 204 No Content
46
- client.text_formatting.italic_text()
47
-
48
- def test_combined_formatting(self, client: DocumentationClient):
49
- # GET /documentation/text-formatting/combined
50
- # Expected: 204 No Content
51
- client.text_formatting.combined_formatting()
@@ -1,25 +0,0 @@
1
- # -------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for
4
- # license information.
5
- # --------------------------------------------------------------------------
6
- import pytest
7
-
8
- from streaming.jsonl import JsonlClient
9
-
10
-
11
- @pytest.fixture
12
- def client():
13
- with JsonlClient(endpoint="http://localhost:3000") as client:
14
- yield client
15
-
16
-
17
- JSONL = b'{"desc": "one"}\n{"desc": "two"}\n{"desc": "three"}'
18
-
19
-
20
- def test_basic_send(client: JsonlClient):
21
- client.basic.send(JSONL)
22
-
23
-
24
- def test_basic_recv(client: JsonlClient):
25
- assert b"".join(client.basic.receive()) == JSONL
@@ -1,111 +0,0 @@
1
- # -------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for
4
- # license information.
5
- # --------------------------------------------------------------------------
6
-
7
- import pytest
8
- import isodate
9
- from typetest.array import ArrayClient, models
10
-
11
-
12
- @pytest.fixture
13
- def client():
14
- with ArrayClient() as client:
15
- yield client
16
-
17
-
18
- def test_boolean_value(client: ArrayClient):
19
- assert client.boolean_value.get() == [True, False]
20
- client.boolean_value.put([True, False])
21
-
22
-
23
- def test_datetime_value(client: ArrayClient):
24
- assert client.datetime_value.get() == [isodate.parse_datetime("2022-08-26T18:38:00Z")]
25
- client.datetime_value.put([isodate.parse_datetime("2022-08-26T18:38:00Z")])
26
-
27
-
28
- def test_duration_value(client: ArrayClient):
29
- assert client.duration_value.get() == [isodate.parse_duration("P123DT22H14M12.011S")]
30
- client.duration_value.put([isodate.parse_duration("P123DT22H14M12.011S")])
31
-
32
-
33
- def test_float32_value(client: ArrayClient):
34
- assert client.float32_value.get() == [43.125]
35
- client.float32_value.put([43.125])
36
-
37
-
38
- def test_int32_value(client: ArrayClient):
39
- assert client.int32_value.get() == [1, 2]
40
- client.int32_value.put([1, 2])
41
-
42
-
43
- def test_int64_value(client: ArrayClient):
44
- assert client.int64_value.get() == [2**53 - 1, -(2**53 - 1)]
45
- client.int64_value.put([2**53 - 1, -(2**53 - 1)])
46
-
47
-
48
- def test_model_value(client: ArrayClient):
49
- assert client.model_value.get() == [
50
- models.InnerModel(property="hello"),
51
- models.InnerModel(property="world"),
52
- ]
53
- # test list[model]
54
- client.model_value.put(
55
- [
56
- models.InnerModel(property="hello"),
57
- models.InnerModel(property="world"),
58
- ]
59
- )
60
- # test list[JSON]
61
- client.model_value.put(
62
- [
63
- {"property": "hello"},
64
- {"property": "world"},
65
- ]
66
- )
67
-
68
-
69
- def test_nullable_boolean_value(client: ArrayClient):
70
- assert client.nullable_boolean_value.get() == [True, None, False]
71
- client.nullable_boolean_value.put([True, None, False])
72
-
73
-
74
- def test_nullable_float_value(client: ArrayClient):
75
- assert client.nullable_float_value.get() == [1.25, None, 3.0]
76
- client.nullable_float_value.put([1.25, None, 3.0])
77
-
78
-
79
- def test_nullable_int32_value(client: ArrayClient):
80
- assert client.nullable_int32_value.get() == [1, None, 3]
81
- client.nullable_int32_value.put([1, None, 3])
82
-
83
-
84
- def test_nullable_model_value(client: ArrayClient):
85
- assert client.nullable_model_value.get() == [
86
- models.InnerModel(property="hello"),
87
- None,
88
- models.InnerModel(property="world"),
89
- ]
90
- client.nullable_model_value.put(
91
- [
92
- models.InnerModel(property="hello"),
93
- None,
94
- models.InnerModel(property="world"),
95
- ]
96
- )
97
-
98
-
99
- def test_nullable_string_value(client: ArrayClient):
100
- assert client.nullable_string_value.get() == ["hello", None, "world"]
101
- client.nullable_string_value.put(["hello", None, "world"])
102
-
103
-
104
- def test_string_value(client: ArrayClient):
105
- assert client.string_value.get() == ["hello", ""]
106
- client.string_value.put(["hello", ""])
107
-
108
-
109
- def test_unknown_value(client: ArrayClient):
110
- assert client.unknown_value.get() == [1, "hello", None]
111
- client.unknown_value.put([1, "hello", None])