From a4a28e908d7404272a0dd4cf5cdb0e9a346b9dea Mon Sep 17 00:00:00 2001 From: rafid saad Date: Mon, 2 Feb 2026 17:50:52 -0800 Subject: [PATCH] Address comments --- libs/sdk-py/tests/test_crons_client.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libs/sdk-py/tests/test_crons_client.py b/libs/sdk-py/tests/test_crons_client.py index cb397687a..f19f8c524 100644 --- a/libs/sdk-py/tests/test_crons_client.py +++ b/libs/sdk-py/tests/test_crons_client.py @@ -278,8 +278,16 @@ def test_sync_create_with_end_time(): assert result == cron -def test_sync_create_with_enabled(): - """Test that SyncCronClient.create includes enabled in the payload.""" +@pytest.mark.parametrize( + "enabled_value", + [ + True, + False + ], + ids=["enabled", "disabled"], +) +def test_sync_create_with_enabled_parameter(enabled_value): + """Test that SyncCronClient.create includes enabled parameter in the payload.""" cron = _cron_payload() def handler(request: httpx.Request) -> httpx.Response: @@ -289,7 +297,7 @@ def test_sync_create_with_enabled(): body = json.loads(request.content) assert body["schedule"] == "0 12 * * *" assert body["assistant_id"] == "asst_456" - assert body["enabled"] + assert body["enabled"] == enabled_value return httpx.Response(200, json=cron) @@ -300,7 +308,7 @@ def test_sync_create_with_enabled(): result = cron_client.create( assistant_id="asst_456", schedule="0 12 * * *", - enabled=True, + enabled=enabled_value, ) assert result == cron