Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
updated live tests for conv authoring
  • Loading branch information
amber-Chen-86 committed Jan 9, 2026
commit 1e3b2d86554e919ee327208553b68223e5c4ea8c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# pylint: disable=line-too-long,useless-suppression
import functools
import pytest

from devtools_testutils import AzureRecordedTestCase, EnvironmentVariableLoader, recorded_by_proxy
from azure.core.credentials import AzureKeyCredential
Expand All @@ -18,7 +19,7 @@ class TestConversations(AzureRecordedTestCase):
def create_client(self, endpoint, key):
return ConversationAuthoringClient(endpoint, AzureKeyCredential(key))


@pytest.mark.playback_test_only
class TestConversationsCancelTrainingSync(TestConversations):
@ConversationsPreparer()
@recorded_by_proxy
Expand All @@ -27,7 +28,7 @@ def test_cancel_training_job(self, authoring_endpoint, authoring_key):
client = self.create_client(authoring_endpoint, authoring_key)

project_client = client.get_project_client("Test-data-labels")
job_id = "0f2fa6fe-c39c-48d5-a1e1-1e549a1c2299_638985888000000000"
job_id = "e39f6ec0-9ba9-426b-989d-3e0804bdcd1c_639034272000000000"

poller = project_client.project.begin_cancel_training_job(
job_id=job_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TestConversationsAsync(AzureRecordedTestCase):
async def create_client(self, endpoint: str, key: str) -> ConversationAuthoringClient:
return ConversationAuthoringClient(endpoint, AzureKeyCredential(key))


@pytest.mark.playback_test_only
class TestConversationsCancelTrainingAsync(TestConversationsAsync):
@ConversationsPreparer()
@recorded_by_proxy_async
Expand All @@ -29,7 +29,7 @@ async def test_cancel_training_job_async(self, authoring_endpoint, authoring_key
client = await self.create_client(authoring_endpoint, authoring_key)
try:
project_name = "Test-data-labels"
job_id = "122b7341-afaa-4bea-af63-f6c7e0539fcb_638985888000000000"
job_id = "fb3b428d-185f-4d6e-a777-e3fd86cab993_639034272000000000"
project_client = client.get_project_client(project_name)

poller = await project_client.project.begin_cancel_training_job(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# pylint: disable=line-too-long,useless-suppression
import functools
import pytest

from devtools_testutils import AzureRecordedTestCase, EnvironmentVariableLoader, recorded_by_proxy
from azure.core.credentials import AzureKeyCredential
Expand All @@ -19,15 +20,15 @@ class TestConversations(AzureRecordedTestCase):
def create_client(self, endpoint, key):
return ConversationAuthoringClient(endpoint, AzureKeyCredential(key))


@pytest.mark.playback_test_only
class TestConversationsDeleteDeploymentSync(TestConversations):
@ConversationsPreparer()
@recorded_by_proxy
def test_delete_deployment(self, authoring_endpoint, authoring_key):
client = self.create_client(authoring_endpoint, authoring_key)

project_name = "Test-data-labels"
deployment_name = "deployment2"
deployment_name = "deployment1"

project_client = client.get_project_client(project_name)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestConversationsAsync(AzureRecordedTestCase):
async def create_client(self, endpoint: str, key: str) -> ConversationAuthoringClient:
return ConversationAuthoringClient(endpoint, AzureKeyCredential(key))


@pytest.mark.playback_test_only
class TestConversationsDeleteDeploymentAsync(TestConversationsAsync):
@ConversationsPreparer()
@recorded_by_proxy_async
Expand All @@ -30,7 +30,7 @@ async def test_delete_deployment_async(self, authoring_endpoint, authoring_key):
client = await self.create_client(authoring_endpoint, authoring_key)
async with client:
project_name = "Test-data-labels"
deployment_name = "deployment2"
deployment_name = "deployment1"

project_client = client.get_project_client(project_name)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# pylint: disable=line-too-long,useless-suppression
import functools
import pytest

from devtools_testutils import AzureRecordedTestCase, EnvironmentVariableLoader, recorded_by_proxy
from azure.core.credentials import AzureKeyCredential
Expand All @@ -19,7 +20,7 @@ class TestConversations(AzureRecordedTestCase):
def create_client(self, endpoint, key):
return ConversationAuthoringClient(endpoint, AzureKeyCredential(key))


@pytest.mark.playback_test_only
class TestConversationsDeleteDeploymentSync(TestConversations):
@ConversationsPreparer()
@recorded_by_proxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestConversationsAsync(AzureRecordedTestCase):
async def create_client(self, endpoint: str, key: str) -> ConversationAuthoringClient:
return ConversationAuthoringClient(endpoint, AzureKeyCredential(key))


@pytest.mark.playback_test_only
class TestConversationsDeleteDeploymentFromResourcesAsync(TestConversationsAsync):
@ConversationsPreparer()
@recorded_by_proxy_async
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TestConversationsDeleteProjectSync(TestConversations):
@recorded_by_proxy
def test_delete_project(self, authoring_endpoint, authoring_key):
authoring_client = self.create_client(authoring_endpoint, authoring_key)
project_name = "MyPythonProject0820"
project_name = "MyPythonProject1110"

# Act: begin delete (LRO)
poller = authoring_client.begin_delete_project(project_name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TestConversationsDeleteProjectAsync(TestConversationsAsync):
async def test_delete_project_async(self, authoring_endpoint, authoring_key):
client = await self.create_client(authoring_endpoint, authoring_key)
async with client:
project_name = "PythonImportProject0820"
project_name = "MyPythonProject1110Async"

# Begin delete; LRO now returns None on success
poller = await client.begin_delete_project(project_name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TestConversationsExportCase(TestConversations):
@recorded_by_proxy
def test_export_project(self, authoring_endpoint, authoring_key):
authoring_client = self.create_client(authoring_endpoint, authoring_key)
project_name = "PythonImportProject0820"
project_name = "Test-data-labels"
project_client = authoring_client.get_project_client(project_name)

# Act: begin export (LRO)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class TestConversationsGetModelEvaluationResultsSync(TestConversations):
def test_get_model_evaluation_results(self, authoring_endpoint, authoring_key):
authoring_client = self.create_client(authoring_endpoint, authoring_key)

project_name = "Aurora-CLU-Prod"
trained_model_label = "m1"
project_name = "EmailApp"
trained_model_label = "Model1"

# Get trained-model scoped client and fetch the paged evaluation results
project_client = authoring_client.get_project_client(project_name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class TestConversationsGetModelEvaluationResultsAsync(TestConversationsAsync):
async def test_get_model_evaluation_results_async(self, authoring_endpoint, authoring_key):
client = await self.create_client(authoring_endpoint, authoring_key)
try:
project_name = "Aurora-CLU-Prod"
trained_model_label = "m1"
project_name = "EmailApp"
trained_model_label = "Model1"

# Get trained-model scoped client and fetch the paged evaluation results
project_client = client.get_project_client(project_name)
Expand Down
Loading