Test if return list of static and shared modules
()
| 49 | |
| 50 | |
| 51 | def test_modules(): |
| 52 | """ |
| 53 | Test if return list of static and shared modules |
| 54 | """ |
| 55 | with patch("salt.modules.apache._detect_os", MagicMock(return_value="apachectl")): |
| 56 | mock = MagicMock( |
| 57 | return_value=( |
| 58 | "unixd_module (static)\n " |
| 59 | " access_compat_module (shared)" |
| 60 | ) |
| 61 | ) |
| 62 | with patch.dict(apache.__salt__, {"cmd.run": mock}): |
| 63 | assert apache.modules() == { |
| 64 | "shared": ["access_compat_module"], |
| 65 | "static": ["unixd_module"], |
| 66 | } |
| 67 | |
| 68 | |
| 69 | # 'servermods' function tests: 1 |