diff --git a/argilla-server/tests/unit/api/handlers/v1/datasets/test_create_dataset.py b/argilla-server/tests/unit/api/handlers/v1/datasets/test_create_dataset.py index 7ad7246cda..41b236af2b 100644 --- a/argilla-server/tests/unit/api/handlers/v1/datasets/test_create_dataset.py +++ b/argilla-server/tests/unit/api/handlers/v1/datasets/test_create_dataset.py @@ -117,3 +117,23 @@ async def test_create_dataset_with_overlap_distribution_using_invalid_min_submit assert response.status_code == 422 assert (await db.execute(select(func.count(Dataset.id)))).scalar_one() == 0 + + async def test_create_dataset_with_invalid_distribution_stategry(self, db: AsyncSession, async_client: AsyncClient, owner_auth_header: dict): + workspace = await WorkspaceFactory.create() + + response = await async_client.post( + self.url(), + headers=owner_auth_header, + json={ + "name": "Dataset Name", + "distribution": { + "strategy": "invalid_strategy", + }, + "workspace_id": str(workspace.id), + }, + ) + + import pdb; pdb.set_trace() + + assert response.status_code == 422 + assert (await db.execute(select(func.count(Dataset.id)))).scalar_one() == 0