Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: internal
packages:
- "@typespec/http-client-python"
---

Add sync and async mock API tests for the Azure client-generator-core usage namespace usage scenario from azure-http-specs.
8 changes: 4 additions & 4 deletions packages/http-client-python/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions packages/http-client-python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@
"@azure-tools/typespec-azure-rulesets": ">=0.68.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.68.0 <1.0.0",
"@typespec/compiler": "^1.12.0",
"@typespec/events": ">=0.82.0 <1.0.0",
"@typespec/http": "^1.12.0",
"@typespec/openapi": "^1.12.0",
"@typespec/rest": ">=0.82.0 <1.0.0",
"@typespec/versioning": ">=0.82.0 <1.0.0",
"@typespec/events": ">=0.82.0 <1.0.0",
"@typespec/sse": ">=0.82.0 <1.0.0",
"@typespec/streams": ">=0.82.0 <1.0.0",
"@typespec/versioning": ">=0.82.0 <1.0.0",
"@typespec/xml": ">=0.82.0 <1.0.0"
},
"playgroundConfig": {
Expand All @@ -98,27 +98,27 @@
"tsx": "^4.21.0"
},
"devDependencies": {
"@azure-tools/azure-http-specs": "^0.1.0-alpha.41-dev.2",
"@azure-tools/typespec-autorest": "~0.68.0",
"@azure-tools/typespec-azure-core": "~0.68.0",
"@azure-tools/typespec-azure-resource-manager": "~0.68.0",
"@azure-tools/typespec-azure-rulesets": "~0.68.0",
"@azure-tools/typespec-client-generator-core": "~0.68.2",
"@azure-tools/azure-http-specs": "0.1.0-alpha.41-dev.1",
"@types/js-yaml": "~4.0.5",
"@types/node": "~25.0.2",
"@types/semver": "7.5.8",
"@typespec/compiler": "^1.12.0",
"@typespec/events": "~0.82.0",
"@typespec/http": "^1.12.0",
"@typespec/http-specs": "0.1.0-alpha.37",
"@typespec/openapi": "^1.12.0",
"@typespec/rest": "~0.82.0",
"@typespec/versioning": "~0.82.0",
"@typespec/events": "~0.82.0",
"@typespec/spector": "0.1.0-alpha.25",
"@typespec/spec-api": "0.1.0-alpha.14",
"@typespec/spector": "0.1.0-alpha.25",
"@typespec/sse": "~0.82.0",
"@typespec/streams": "~0.82.0",
"@typespec/versioning": "~0.82.0",
"@typespec/xml": "~0.82.0",
"@typespec/http-specs": "0.1.0-alpha.37",
"@types/js-yaml": "~4.0.5",
"@types/node": "~25.0.2",
"@types/semver": "7.5.8",
"c8": "^10.1.3",
"picocolors": "~1.1.1",
"rimraf": "~6.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ async def test_orphan_model_serializable(client: UsageClient):
await client.model_in_operation.orphan_model_serializable(
body=models.OrphanModel(model_name="name", description="desc")
)


@pytest.mark.asyncio
async def test_namespace_model_serializable(client: UsageClient):
namespace_model = models.NamespaceModel(name="test")
await client.namespace_usage.namespace_model_serializable(body=namespace_model)
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ def test_model_usage(client: UsageClient):

def test_orphan_model_serializable(client: UsageClient):
client.model_in_operation.orphan_model_serializable(body=models.OrphanModel(model_name="name", description="desc"))


def test_namespace_model_serializable(client: UsageClient):
namespace_model = models.NamespaceModel(name="test")
client.namespace_usage.namespace_model_serializable(body=namespace_model)
Loading