From 9d7d6538ffa942aa752a10cad25409da5fa468be Mon Sep 17 00:00:00 2001 From: lukken <lukken@astron.nl> Date: Thu, 6 Apr 2023 13:15:54 +0000 Subject: [PATCH] L2SS-939: Use native mock library instead of external dependency --- tangostationcontrol/requirements.txt | 2 -- tangostationcontrol/test/beam/test_delays.py | 2 +- tangostationcontrol/test/clients/test_attr_wrapper.py | 2 +- tangostationcontrol/test/devices/device_base.py | 2 +- tangostationcontrol/test/devices/interfaces/test_hierarchy.py | 2 +- tangostationcontrol/test/devices/sdp/test_statistics_device.py | 2 +- 6 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tangostationcontrol/requirements.txt b/tangostationcontrol/requirements.txt index 4e42c9a51..edcf00931 100644 --- a/tangostationcontrol/requirements.txt +++ b/tangostationcontrol/requirements.txt @@ -5,9 +5,7 @@ importlib-metadata<2.0.0,>=0.12;python_version<"3.8" lofar-station-client@git+https://git.astron.nl/lofar2.0/lofar-station-client numpy -mock asyncua >= 0.9.90 # LGPLv3 -PyMySQL[rsa] >= 1.0.2 # MIT psycopg2-binary >= 2.9.2 # LGPL pysnmp >= 0.1.7 # BSD h5py >= 3.1.0 # BSD diff --git a/tangostationcontrol/test/beam/test_delays.py b/tangostationcontrol/test/beam/test_delays.py index 8fa7161c8..683a96c73 100644 --- a/tangostationcontrol/test/beam/test_delays.py +++ b/tangostationcontrol/test/beam/test_delays.py @@ -6,7 +6,7 @@ import logging import time import casacore -import mock +from unittest import mock import numpy import numpy.testing diff --git a/tangostationcontrol/test/clients/test_attr_wrapper.py b/tangostationcontrol/test/clients/test_attr_wrapper.py index d540d946b..62935f5d9 100644 --- a/tangostationcontrol/test/clients/test_attr_wrapper.py +++ b/tangostationcontrol/test/clients/test_attr_wrapper.py @@ -5,7 +5,7 @@ """ import asyncio -import mock +from unittest import mock import tangostationcontrol.devices.interfaces.lofar_device from tangostationcontrol.clients.attribute_wrapper import AttributeWrapper diff --git a/tangostationcontrol/test/devices/device_base.py b/tangostationcontrol/test/devices/device_base.py index 7f782259c..44151df0b 100644 --- a/tangostationcontrol/test/devices/device_base.py +++ b/tangostationcontrol/test/devices/device_base.py @@ -1,7 +1,7 @@ # Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) # SPDX-License-Identifier: Apache-2.0 -import mock +from unittest import mock from tangostationcontrol.devices.interfaces import lofar_device diff --git a/tangostationcontrol/test/devices/interfaces/test_hierarchy.py b/tangostationcontrol/test/devices/interfaces/test_hierarchy.py index 174599a7e..31c595632 100644 --- a/tangostationcontrol/test/devices/interfaces/test_hierarchy.py +++ b/tangostationcontrol/test/devices/interfaces/test_hierarchy.py @@ -6,7 +6,7 @@ import logging from typing import Callable from typing import Dict from typing import List -from mock import Mock +from unittest.mock import Mock from tango import DevState diff --git a/tangostationcontrol/test/devices/sdp/test_statistics_device.py b/tangostationcontrol/test/devices/sdp/test_statistics_device.py index 42ebee21f..567218d8e 100644 --- a/tangostationcontrol/test/devices/sdp/test_statistics_device.py +++ b/tangostationcontrol/test/devices/sdp/test_statistics_device.py @@ -1,7 +1,7 @@ # Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) # SPDX-License-Identifier: Apache-2.0 -import mock +from unittest import mock from tango import server from tango.test_context import DeviceTestContext -- GitLab