From eb4dd46e356018ae6d87bd8963a72270b8bb0751 Mon Sep 17 00:00:00 2001 From: Emanuele Palazzetti Date: Fri, 3 Nov 2023 13:42:42 +0000 Subject: [PATCH] tests: add _() helper to generate mock path --- tests/helpers.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/helpers.py diff --git a/tests/helpers.py b/tests/helpers.py new file mode 100644 index 0000000..f7175e8 --- /dev/null +++ b/tests/helpers.py @@ -0,0 +1,14 @@ +def _(mock_path: str) -> str: + """Helper to simplify Mock path strings. + + Args: + mock_path (str): The partial path to be appended to the standard prefix for mock paths. + + Returns: + str: The full mock path combined with the standard prefix. + + Example: + >>> _("module.Class.method") + "custom_components.econnect_metronet.module.Class.method" + """ + return f"custom_components.econnect_metronet.{mock_path}"