Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nik committed Jan 29, 2025
1 parent 431bde8 commit 4dff6d0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions label_studio/tests/sdk/test_export.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
import pandas as pd
import pytest

from label_studio.tests.sdk.common import LABEL_CONFIG_AND_TASKS

pytestmark = pytest.mark.django_db
Expand All @@ -16,21 +17,21 @@ def test_project(django_live_url, business_client):

def test_export_formats(test_project):
ls, project = test_project

# Get available export formats
formats = ls.projects.exports.get_formats(project.id)
formats = ls.projects.exports.list_formats(project.id)
assert len(formats) > 0


def test_direct_export(test_project):
ls, project = test_project

# Test JSON export
json_data = ls.projects.exports.as_json(project.id)
assert isinstance(json_data, list)
assert len(json_data) == 1

# Test pandas export
df = ls.projects.exports.as_pandas(project.id)
assert isinstance(df, pd.DataFrame)
assert len(df) == 1
assert len(df) == 1

0 comments on commit 4dff6d0

Please sign in to comment.