Skip to content
Merged
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 mock API tests for new Spector scenarios: ARM operation templates (Legacy RoutedOperations, LRO on GET, POST LRO with paging body, POST action paging, markAsPageable) and `@clientApiVersions` decorator
Comment thread
msyyc marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import pytest
import pytest_asyncio
from azure.clientgenerator.core.apiversion.clientapiversions.aio import ClientApiVersionsClient


@pytest_asyncio.fixture
async def client():
async with ClientApiVersionsClient(endpoint="http://localhost:3000", api_version="2022-10-01") as client:
yield client


@pytest.mark.asyncio
async def test_send_api_version(client: ClientApiVersionsClient):
await client.send_api_version()
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import pytest
from azure.clientgenerator.core.apiversion.clientapiversions import ClientApiVersionsClient


@pytest.fixture
def client():
with ClientApiVersionsClient(endpoint="http://localhost:3000", api_version="2022-10-01") as client:
yield client


def test_send_api_version(client: ClientApiVersionsClient):
client.send_api_version()
Loading