Skip to content

Commit

Permalink
feat: add additional test to check invalid distribution strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
jfcalvo committed Jun 14, 2024
1 parent 6953fb7 commit 2082e12
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2082e12

Please sign in to comment.