Skip to content

Commit 1177787

Browse files
style
1 parent 385a918 commit 1177787

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/_incydr_cli/cmds/users.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

tests/test_users.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@
1515
from _incydr_sdk.users.models import User
1616
from _incydr_sdk.users.models import UserRole
1717
from _incydr_sdk.users.models import UsersPage
18-
from incydr.models import Agent
19-
from incydr.models import AgentsPage
2018
from incydr import Client
2119

2220
TEST_USER_ID = "user-1"
2321
TEST_ORG_GUID = "orgGuid-1"
2422

2523

26-
2724
TEST_AGENT_ID = "agent-1"
2825

2926
TEST_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
278276
def 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
297296
def mock_get_user_roles(httpserver_auth: HTTPServer):
298297
roles_data = {

0 commit comments

Comments
 (0)