From a4684c6e073e474d190e23f8389c43bd861fd9d2 Mon Sep 17 00:00:00 2001 From: Brian Koopman Date: Mon, 18 Dec 2023 18:13:49 -0500 Subject: [PATCH] Create test for initialize function --- tests/test_sorunlib.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/test_sorunlib.py diff --git a/tests/test_sorunlib.py b/tests/test_sorunlib.py new file mode 100644 index 0000000..e1306cf --- /dev/null +++ b/tests/test_sorunlib.py @@ -0,0 +1,13 @@ +from unittest.mock import MagicMock, patch + +from util import mocked_clients + +import sorunlib +from sorunlib import initialize + + +@patch('sorunlib.commands.time.sleep', MagicMock()) +@patch('sorunlib.create_clients', mocked_clients) +def test_initialize(): + initialize() + assert sorunlib.CLIENTS is not None