Skip to content

Commit

Permalink
MAINT: Formatting
Browse files Browse the repository at this point in the history
Pylint was showing errors, formatting the files
  • Loading branch information
meoflynn committed Jan 24, 2025
1 parent 1751c0f commit 2677196
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 0 additions & 2 deletions lib/workflows/icinga_downtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def schedule_downtime(
is_fixed: bool,
duration: Optional[int] = None,
):

# Local UK time to Unix timestamp
start_datetime = datetime.strptime(start_time, "%d/%m/%y %H:%M:%S")
end_datetime = datetime.strptime(end_time, "%d/%m/%y %H:%M:%S")
Expand All @@ -48,7 +47,6 @@ def schedule_downtime(


def remove_downtime(icinga_account: IcingaAccount, object_type: str, name: str):

downtime.remove_downtime(
icinga_account=icinga_account,
object_type=IcingaObject[object_type.upper()],
Expand Down
1 change: 0 additions & 1 deletion tests/actions/test_openstack_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def test_run_with_openstack(self, mock_openstack_connection, mock_import):
mock_openstack_connection.return_value.__enter__.return_value = mock_conn

with patch.object(self.action, "parse_configs") as mock_parse_configs:

mock_parse_configs.return_value = {
"kwarg1": "foo",
"kwarg2": "bar",
Expand Down
3 changes: 2 additions & 1 deletion tests/enums/test_user_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ def test_default_serialization(domain):
"""
assert UserDomains.from_string(domain) is UserDomains.DEFAULT


@pytest.mark.parametrize("domain", ["jasmin", "JaSmIn", "JASMIN"])
def test_jasmin_serialization(domain):
"""
Tests that variants of JASMIN can be serialized
"""
assert UserDomains.from_string(domain) is UserDomains.JASMIN
assert UserDomains.from_string(domain) is UserDomains.JASMIN
7 changes: 6 additions & 1 deletion tests/lib/openstack_api/test_openstack_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def test_create_project_successful_no_domain_id():
)
assert res == mock_conn.identity.create_project.return_value


def test_create_project_successful_no_parent_id_and_not_immutable():
"""
Tests that create project works
Expand All @@ -100,7 +101,11 @@ def test_create_project_successful_no_parent_id_and_not_immutable():
res = create_project(mock_conn, mock_project_details)

mock_conn.identity.create_project.assert_called_once_with(
name="foo", description="bar", domain_id="buzz", is_enabled=True, tags=["[email protected]"]
name="foo",
description="bar",
domain_id="buzz",
is_enabled=True,
tags=["[email protected]"],
)
assert res == mock_conn.identity.create_project.return_value

Expand Down

0 comments on commit 2677196

Please sign in to comment.