|
6 | 6 |
|
7 | 7 | import ssdutil.main as ssdutil # noqa: E402
|
8 | 8 |
|
9 |
| -# Add mocked_libs path so that the file under test can load mocked modules from there |
| 9 | +# Add mocked_libs path so that the file can load mocked modules from there |
10 | 10 | tests_path = os.path.dirname(os.path.abspath(__file__))
|
11 | 11 | mocked_libs_path = os.path.join(tests_path, "mocked_libs")
|
12 | 12 | sys.path.insert(0, mocked_libs_path)
|
13 | 13 |
|
14 |
| -from .mocked_libs import sonic_platform_base #.sonic_platform_base.sonic_ssd import ssd_generic |
15 |
| -#from .mocked_libs #.sonic_platform_base.sonic_storage import ssd |
| 14 | +from .mocked_libs import sonic_platform_base # noqa: E402,F401 |
| 15 | + |
16 | 16 |
|
17 | 17 | test_path = os.path.dirname(os.path.abspath(__file__))
|
18 | 18 | modules_path = os.path.dirname(test_path)
|
@@ -59,8 +59,8 @@ class TestSsdutil:
|
59 | 59 | @patch('sonic_py_common.device_info.get_paths_to_platform_and_hwsku_dirs',
|
60 | 60 | MagicMock(return_value=("test_path", "")))
|
61 | 61 | @patch('os.geteuid', MagicMock(return_value=0))
|
62 |
| - @patch('sonic_platform_base.sonic_ssd.ssd_generic.SsdUtil', MagicMock(return_value=Ssd())) |
63 |
| - @patch('sonic_platform_base.sonic_storage.ssd.SsdUtil', MagicMock(return_value=Ssd())) |
| 62 | + @patch('sonic_platform_base.sonic_ssd.ssd_generic.SsdUtil', MagicMock(return_value=Ssd())) # noqa: E501 |
| 63 | + @patch('sonic_platform_base.sonic_storage.ssd.SsdUtil', MagicMock(return_value=Ssd())) # noqa: E501 |
64 | 64 | def test_happy_path(self):
|
65 | 65 |
|
66 | 66 | ssdutil.ssdutil()
|
0 commit comments