From abe563695257c9f5ea7eb618dd044bf5256cb4fb Mon Sep 17 00:00:00 2001 From: Hanwen Date: Wed, 24 Jan 2024 12:12:59 -0800 Subject: [PATCH] Fix unit tests Signed-off-by: Hanwen --- test/unit/ec2_udev_rules/test_manage_volume.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/unit/ec2_udev_rules/test_manage_volume.py b/test/unit/ec2_udev_rules/test_manage_volume.py index 9d61830ec2..42e77fc154 100644 --- a/test/unit/ec2_udev_rules/test_manage_volume.py +++ b/test/unit/ec2_udev_rules/test_manage_volume.py @@ -117,6 +117,8 @@ def test_attach_volume(mocker, volume_response, state, message, ec2_mock, capsys mocker.patch("time.sleep", return_value=None) mocker.patch("os.popen", mocker.mock_open(read_data="sdf")) mocker.patch("subprocess.check_output", return_value="xvda") + mocker.patch("os.makedirs") + mocker.patch("builtins.open", mocker.mock_open()) volume_response["State"] = state ec2_mock.attach_volume.return_value = volume_response