@typespec/http-client-python 0.12.5 → 0.13.0-dev.1
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.
- package/dist/emitter/types.d.ts.map +1 -1
- package/dist/emitter/types.js +5 -12
- package/dist/emitter/types.js.map +1 -1
- package/emitter/src/types.ts +7 -14
- package/emitter/temp/tsconfig.tsbuildinfo +1 -1
- package/eng/scripts/setup/__pycache__/venvtools.cpython-39.pyc +0 -0
- package/eng/scripts/setup/build_pygen_wheel.py +10 -9
- package/eng/scripts/setup/install.py +17 -13
- package/eng/scripts/setup/prepare.py +12 -4
- package/eng/scripts/setup/venvtools.py +42 -1
- package/generator/build/lib/pygen/codegen/models/property.py +0 -6
- package/generator/build/lib/pygen/codegen/templates/packaging_templates/README.md.jinja2 +0 -31
- package/generator/dist/pygen-0.1.0-py3-none-any.whl +0 -0
- package/generator/pygen/codegen/models/property.py +0 -6
- package/generator/pygen/codegen/templates/packaging_templates/README.md.jinja2 +0 -31
- package/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_commonproperties_async.py +0 -31
- package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_client_initialization_async.py +0 -9
- package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_usage_async.py +0 -7
- package/generator/test/azure/mock_api_tests/test_azure_arm_commonproperties.py +0 -29
- package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_client_initialization.py +0 -8
- package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_usage.py +0 -4
- package/generator/test/azure/requirements.txt +0 -4
- package/package.json +1 -1
- package/eng/scripts/setup/__pycache__/package_manager.cpython-39.pyc +0 -0
- package/eng/scripts/setup/package_manager.py +0 -139
- package/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_largeheader_async.py +0 -30
- package/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_nonresource_async.py +0 -36
- package/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_deserialize_empty_string_as_null_async.py +0 -20
- package/generator/test/azure/mock_api_tests/asynctests/test_azure_encode_duration_async.py +0 -19
- package/generator/test/azure/mock_api_tests/test_azure_arm_largeheader.py +0 -27
- package/generator/test/azure/mock_api_tests/test_azure_arm_nonresource.py +0 -34
- package/generator/test/azure/mock_api_tests/test_azure_client_generator_core_deserialize_empty_string_as_null.py +0 -19
- package/generator/test/azure/mock_api_tests/test_azure_encode_duration.py +0 -18
|
@@ -1,36 +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 azure.resourcemanager.nonresource.aio import NonResourceClient
|
|
8
|
-
from azure.resourcemanager.nonresource import models
|
|
9
|
-
|
|
10
|
-
SUBSCRIPTION_ID = "00000000-0000-0000-0000-000000000000"
|
|
11
|
-
RESOURCE_GROUP_NAME = "test-rg"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@pytest.fixture
|
|
15
|
-
async def client(credential, authentication_policy):
|
|
16
|
-
async with NonResourceClient(
|
|
17
|
-
credential, SUBSCRIPTION_ID, "http://localhost:3000", authentication_policy=authentication_policy
|
|
18
|
-
) as client:
|
|
19
|
-
yield client
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
@pytest.mark.asyncio
|
|
23
|
-
async def test_non_resource_create(client: NonResourceClient):
|
|
24
|
-
result = await client.non_resource_operations.create(
|
|
25
|
-
location="eastus", parameter="hello", body=models.NonResource(id="id", name="hello", type="nonResource")
|
|
26
|
-
)
|
|
27
|
-
assert result == models.NonResource(id="id", name="hello", type="nonResource")
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
@pytest.mark.asyncio
|
|
31
|
-
async def test_non_resource_get(client: NonResourceClient):
|
|
32
|
-
result = await client.non_resource_operations.get(
|
|
33
|
-
location="eastus",
|
|
34
|
-
parameter="hello",
|
|
35
|
-
)
|
|
36
|
-
assert result == models.NonResource(id="id", name="hello", type="nonResource")
|
|
@@ -1,20 +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 specs.azure.clientgenerator.core.emptystring.aio import DeserializeEmptyStringAsNullClient
|
|
8
|
-
from specs.azure.clientgenerator.core.emptystring import models
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@pytest.fixture
|
|
12
|
-
async def client():
|
|
13
|
-
async with DeserializeEmptyStringAsNullClient() as client:
|
|
14
|
-
yield client
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@pytest.mark.asyncio
|
|
18
|
-
async def test_get(client: DeserializeEmptyStringAsNullClient):
|
|
19
|
-
result = await client.get()
|
|
20
|
-
assert result == models.ResponseModel(sample_url="")
|
|
@@ -1,19 +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 specs.azure.encode.duration.aio import DurationClient
|
|
8
|
-
from specs.azure.encode.duration import models
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@pytest.fixture
|
|
12
|
-
async def client():
|
|
13
|
-
async with DurationClient() as client:
|
|
14
|
-
yield client
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@pytest.mark.asyncio
|
|
18
|
-
async def test_duration_constant(client: DurationClient):
|
|
19
|
-
await client.duration_constant(models.DurationModel(input="1.02:59:59.5000000"))
|
|
@@ -1,27 +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 azure.resourcemanager.largeheader import LargeHeaderClient
|
|
8
|
-
from azure.resourcemanager.largeheader import models
|
|
9
|
-
|
|
10
|
-
SUBSCRIPTION_ID = "00000000-0000-0000-0000-000000000000"
|
|
11
|
-
RESOURCE_GROUP_NAME = "test-rg"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@pytest.fixture
|
|
15
|
-
def client(credential, authentication_policy):
|
|
16
|
-
with LargeHeaderClient(
|
|
17
|
-
credential, SUBSCRIPTION_ID, "http://localhost:3000", authentication_policy=authentication_policy
|
|
18
|
-
) as client:
|
|
19
|
-
yield client
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def test_large_headers_begin_two6_k(client: LargeHeaderClient):
|
|
23
|
-
result = client.large_headers.begin_two6_k(
|
|
24
|
-
resource_group_name=RESOURCE_GROUP_NAME,
|
|
25
|
-
large_header_name="header1",
|
|
26
|
-
).result()
|
|
27
|
-
assert result == models.CancelResult(succeeded=True)
|
|
@@ -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
|
-
from azure.resourcemanager.nonresource import NonResourceClient
|
|
8
|
-
from azure.resourcemanager.nonresource import models
|
|
9
|
-
|
|
10
|
-
SUBSCRIPTION_ID = "00000000-0000-0000-0000-000000000000"
|
|
11
|
-
RESOURCE_GROUP_NAME = "test-rg"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@pytest.fixture
|
|
15
|
-
def client(credential, authentication_policy):
|
|
16
|
-
with NonResourceClient(
|
|
17
|
-
credential, SUBSCRIPTION_ID, "http://localhost:3000", authentication_policy=authentication_policy
|
|
18
|
-
) as client:
|
|
19
|
-
yield client
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def test_non_resource_create(client: NonResourceClient):
|
|
23
|
-
result = client.non_resource_operations.create(
|
|
24
|
-
location="eastus", parameter="hello", body=models.NonResource(id="id", name="hello", type="nonResource")
|
|
25
|
-
)
|
|
26
|
-
assert result == models.NonResource(id="id", name="hello", type="nonResource")
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
def test_non_resource_get(client: NonResourceClient):
|
|
30
|
-
result = client.non_resource_operations.get(
|
|
31
|
-
location="eastus",
|
|
32
|
-
parameter="hello",
|
|
33
|
-
)
|
|
34
|
-
assert result == models.NonResource(id="id", name="hello", type="nonResource")
|
|
@@ -1,19 +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 specs.azure.clientgenerator.core.emptystring import DeserializeEmptyStringAsNullClient
|
|
8
|
-
from specs.azure.clientgenerator.core.emptystring import models
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@pytest.fixture
|
|
12
|
-
def client():
|
|
13
|
-
with DeserializeEmptyStringAsNullClient() as client:
|
|
14
|
-
yield client
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def test_get(client: DeserializeEmptyStringAsNullClient):
|
|
18
|
-
result = client.get()
|
|
19
|
-
assert result == models.ResponseModel(sample_url="")
|
|
@@ -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 specs.azure.encode.duration import DurationClient
|
|
8
|
-
from specs.azure.encode.duration import models
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@pytest.fixture
|
|
12
|
-
def client():
|
|
13
|
-
with DurationClient() as client:
|
|
14
|
-
yield client
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def test_duration_constant(client: DurationClient):
|
|
18
|
-
client.duration_constant(models.DurationModel(input="1.02:59:59.5000000"))
|