Skip to content

Commit

Permalink
testlib_refactor: add doctrings for unit test helpers
Browse files Browse the repository at this point in the history
Jira ticket: CMK-20441

Change-Id: Ifd7e92a9c93d12ca61fb912888a051aae171eac3
  • Loading branch information
asyash26 committed Feb 13, 2025
1 parent d321ec6 commit e54c1bc
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/testlib/unit/base_configuration_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
"""This module provides helper classes to modify the Checkmk base configuration.
It includes functionality to add hosts and clusters, set rulesets, and mock autochecks,
ensuring a controlled environment for testing.
"""

import uuid
from collections.abc import Mapping, Sequence
Expand Down
6 changes: 6 additions & 0 deletions tests/testlib/unit/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# Copyright (C) 2024 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
"""This module provides functions to configure RabbitMQ components for Checkmk inter-site
communication.
It includes helper functions to create queues, bindings, permissions, and shovels, and to generate
expected RabbitMQ definitions for replicated and peer-to-peer sites.
"""

from collections.abc import Mapping, Sequence

Expand Down
6 changes: 6 additions & 0 deletions tests/testlib/unit/rest_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# Copyright (C) 2022 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
"""This module defines various classes and functions for handling REST API requests in Checkmk.
It includes clients for different API domains, providing methods to perform create, read, update,
delete operations and other actions.
"""

from __future__ import annotations

import abc
Expand Down
3 changes: 3 additions & 0 deletions tests/testlib/unit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
"""Test utilities module provides functionality for managing plugin registries and dynamic
module importing.
"""

import contextlib
import importlib.machinery
Expand Down

0 comments on commit e54c1bc

Please sign in to comment.