Skip to content

Commit

Permalink
Don't access implementation details in unit tests.
Browse files Browse the repository at this point in the history
Change-Id: I236a3f8184c60469737c196a4ccfb546ff871632
  • Loading branch information
spt29 committed Oct 25, 2023
1 parent c52b6c0 commit ca7f83e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unit/cmk/ec/test_ec_history_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
FileHistory,
parse_history_file,
)
from cmk.ec.main import StatusTableHistory


@pytest.fixture(name="config_with_weekly_history_rotation")
Expand Down Expand Up @@ -49,7 +50,7 @@ def test_convert_history_line(history: FileHistory) -> None:

assert len(values) == 30

convert_history_line(history._history_columns, values)
convert_history_line(StatusTableHistory.columns, values)

assert values[0] == 1 # type: ignore[comparison-overlap]
assert values[1] == 1666942292.2998602 # type: ignore[comparison-overlap]
Expand All @@ -72,7 +73,7 @@ def test_history_parse(history: FileHistory, tmp_path: Path) -> None:
cmd = " | ".join([tac] + _grep_pipeline([filter_])) # type: ignore[list-item]

new_entries = parse_history_file(
history._history_columns,
StatusTableHistory.columns,
path,
lambda x: True,
cmd,
Expand Down

0 comments on commit ca7f83e

Please sign in to comment.