Skip to content

Commit

Permalink
fix linting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hmodi-ns1 committed Jul 19, 2024
1 parent 35c15b0 commit fc3d24b
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 36 deletions.
28 changes: 16 additions & 12 deletions tests/unit/test_apikey.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ def test_manage_jobs_set_to_true(self, apikey_config, name, url):

z.create(name, permissions={"monitoring": {"manage_jobs": True}})

expected_perms = {"monitoring": {
"manage_jobs": False,
"create_jobs": True,
"update_jobs": True,
"delete_jobs": True,
}}
expected_perms = {
"monitoring": {
"manage_jobs": False,
"create_jobs": True,
"update_jobs": True,
"delete_jobs": True,
}
}
z._make_request.assert_called_once_with(
"PUT",
url,
Expand Down Expand Up @@ -140,12 +142,14 @@ def test_mange_jobs_set_to_true(
ip_whitelist=ip_whitelist,
permissions=perms,
)
expected_perms = {"monitoring": {
"manage_jobs": False,
"create_jobs": True,
"update_jobs": True,
"delete_jobs": True,
}}
expected_perms = {
"monitoring": {
"manage_jobs": False,
"create_jobs": True,
"update_jobs": True,
"delete_jobs": True,
}
}
z._make_request.assert_called_once_with(
"POST",
url,
Expand Down
28 changes: 16 additions & 12 deletions tests/unit/test_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ def test_manage_jobs_set_to_true(self, team_config, name, url):

z.create(name, permissions={"monitoring": {"manage_jobs": True}})

expected_perms = {"monitoring": {
"manage_jobs": False,
"create_jobs": True,
"update_jobs": True,
"delete_jobs": True,
}}
expected_perms = {
"monitoring": {
"manage_jobs": False,
"create_jobs": True,
"update_jobs": True,
"delete_jobs": True,
}
}
z._make_request.assert_called_once_with(
"PUT",
url,
Expand Down Expand Up @@ -135,12 +137,14 @@ def test_manage_jobs_set_to_true(
z.update(
team_id, name=name, ip_whitelist=ip_whitelist, permissions=perms
)
expected_perms = {"monitoring": {
"manage_jobs": False,
"create_jobs": True,
"update_jobs": True,
"delete_jobs": True,
}}
expected_perms = {
"monitoring": {
"manage_jobs": False,
"create_jobs": True,
"update_jobs": True,
"delete_jobs": True,
}
}
z._make_request.assert_called_once_with(
"POST",
url,
Expand Down
28 changes: 16 additions & 12 deletions tests/unit/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ def test_manage_jobs_set_to_true(self, user_config, name, username, email, url):
z._make_request = mock.MagicMock()
z.create(name, username, email, permissions={"monitoring": {"manage_jobs": True}})

expected_perms = {"monitoring": {
"manage_jobs": False,
"create_jobs": True,
"update_jobs": True,
"delete_jobs": True,
}}
expected_perms = {
"monitoring": {
"manage_jobs": False,
"create_jobs": True,
"update_jobs": True,
"delete_jobs": True,
}
}
z._make_request.assert_called_once_with(
"PUT",
url,
Expand Down Expand Up @@ -150,12 +152,14 @@ def test_manage_jobs_set_to_true(
z.update(
username, name=name, ip_whitelist=ip_whitelist, permissions=perms
)
expected_perms = {"monitoring": {
"manage_jobs": False,
"create_jobs": True,
"update_jobs": True,
"delete_jobs": True,
}}
expected_perms = {
"monitoring": {
"manage_jobs": False,
"create_jobs": True,
"update_jobs": True,
"delete_jobs": True,
}
}
z._make_request.assert_called_once_with(
"POST",
url,
Expand Down

0 comments on commit fc3d24b

Please sign in to comment.