File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ import pytest
2+
3+
4+ @pytest .mark .integration
5+ class TestListClientInjection :
6+ """Verify that items returned from list operations have working _http_client."""
7+
8+ @pytest .mark .asyncio
9+ async def test_workspaces_list_items_can_use_instance_methods (
10+ self , sdk_client , test_team_id
11+ ):
12+ """Workspaces from list() should be able to call instance methods."""
13+ workspaces = await sdk_client .workspaces .list (team_id = test_team_id )
14+
15+ if len (workspaces ) == 0 :
16+ pytest .skip ("No workspaces available for testing" )
17+
18+ workspace = workspaces [0 ]
19+
20+ assert workspace ._http_client is not None
21+
22+ status = await workspace .get_status ()
23+ assert status is not None
24+
25+ @pytest .mark .asyncio
26+ async def test_teams_list_items_can_access_sub_resources (self , sdk_client ):
27+ """Teams from list() should be able to access sub-resources."""
28+ teams = await sdk_client .teams .list ()
29+
30+ if len (teams ) == 0 :
31+ pytest .skip ("No teams available for testing" )
32+
33+ team = teams [0 ]
34+
35+ assert team ._http_client is not None
36+
37+ domains_manager = team .domains
38+ assert domains_manager is not None
You can’t perform that action at this time.
0 commit comments