Skip to content

Update test_client.py #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 18, 2024
Merged
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
32 changes: 16 additions & 16 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,24 +499,24 @@ def test_invite_teammates():
old_teammates
) # needs to sleep for teammates list to be updated

# deprecated studio tests
# STUDIO_TEST_PROJECT = "python-sdk-studio-test"

STUDIO_TEST_PROJECT = "python-sdk-studio-test"

try:
project = client.get_project(STUDIO_TEST_PROJECT)
except ScaleResourceNotFound:
client.create_project(
project_name=STUDIO_TEST_PROJECT, task_type=TaskType.ImageAnnotation
)
STUDIO_BATCH_TEST_NAME = f"studio-test-batch-{current_timestamp}"
# try:
# project = client.get_project(STUDIO_TEST_PROJECT)
# except ScaleResourceNotFound:
# client.create_project(
# project_name=STUDIO_TEST_PROJECT, task_type=TaskType.ImageAnnotation
# )
# STUDIO_BATCH_TEST_NAME = f"studio-test-batch-{current_timestamp}"


def test_list_studio_batches():
# Create a test project if it does not already exist
# def test_list_studio_batches():
# # Create a test project if it does not already exist

# Create a test batch
client.create_batch(STUDIO_TEST_PROJECT, STUDIO_BATCH_TEST_NAME)
# # Create a test batch
# client.create_batch(STUDIO_TEST_PROJECT, STUDIO_BATCH_TEST_NAME)

# Check that the batch is returned by the list_studio_batches method
batches = client.list_studio_batches()
assert len(batches) > 0
# # Check that the batch is returned by the list_studio_batches method
# batches = client.list_studio_batches()
# assert len(batches) > 0