File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ def list_devices(
139139 List devices associated with a particular user.
140140 """
141141 client = Client ()
142- if '@' in user :
142+ if "@" in user :
143143 user = client .users .v1 .get_user (user ).user_id
144144 devices = list (client .agents .v1 .iter_all (user_id = user ))
145145
Original file line number Diff line number Diff line change 1515from _incydr_sdk .users .models import User
1616from _incydr_sdk .users .models import UserRole
1717from _incydr_sdk .users .models import UsersPage
18- from incydr .models import Agent
19- from incydr .models import AgentsPage
2018from incydr import Client
2119
2220TEST_USER_ID = "user-1"
2321TEST_ORG_GUID = "orgGuid-1"
2422
2523
26-
2724TEST_AGENT_ID = "agent-1"
2825
2926TEST_AGENT_1 = {
@@ -274,14 +271,15 @@ def mock_get_devices(httpserver_auth: HTTPServer):
274271 f"/v1/users/{ TEST_USER_ID } /devices" , method = "GET" , query_string = urlencode (query )
275272 ).respond_with_json (devices_data )
276273
274+
277275@pytest .fixture
278276def mock_get_agents (httpserver_auth : HTTPServer ):
279277 query = {
280278 "srtKey" : "NAME" ,
281279 "srtDir" : "ASC" ,
282280 "pageSize" : 500 ,
283281 "page" : 1 ,
284- "userId" : TEST_USER_ID
282+ "userId" : TEST_USER_ID ,
285283 }
286284 agents_data = {
287285 "agents" : [TEST_AGENT_1 , TEST_AGENT_2 ],
@@ -293,6 +291,7 @@ def mock_get_agents(httpserver_auth: HTTPServer):
293291 "/v1/agents" , method = "GET" , query_string = urlencode (query )
294292 ).respond_with_json (agents_data )
295293
294+
296295@pytest .fixture
297296def mock_get_user_roles (httpserver_auth : HTTPServer ):
298297 roles_data = {
You can’t perform that action at this time.
0 commit comments