Skip to content

Commit be4a916

Browse files
authored
adding test_list_available_teamspaces (#84)
1 parent ddc7c0a commit be4a916

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/integrations/test_cloud.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from lightning_sdk.utils.resolve import _resolve_teamspace
1212
from litmodels import download_model, upload_model
1313
from litmodels.integrations.mixins import PickleRegistryMixin, PyTorchRegistryMixin
14+
from litmodels.io.cloud import _list_available_teamspaces
1415

1516
from tests.integrations import (
1617
_SKIP_IF_LIGHTNING_BELLOW_2_5_1,
@@ -285,3 +286,11 @@ def test_pytorch_mixin_push_and_pull():
285286

286287
# CLEANING
287288
_cleanup_model(teamspace, model_name, expected_num_versions=1)
289+
290+
291+
@pytest.mark.cloud()
292+
def test_list_available_teamspaces():
293+
teams = _list_available_teamspaces()
294+
assert len(teams) > 0
295+
# using sanitized teamspace name
296+
assert f"{LIT_ORG}/oss-litmodels" in teams

0 commit comments

Comments
 (0)