def set_up_mock(self, subprocessmock): subprocessmock.return_value = """ Filesystem 1K-blocks Used Available Use%% Mounted on /dev/sda5 40116616 6168760 31910048 17% / /dev/sda1 145 32 54 29% /opt udev 473120 12 473108 1% /dev none 480128 160 47996""" data = Plugin.data() return data
def test_plugin_call_df(self, subprocessmock): Plugin.data() subprocessmock.assert_called_with('df')