Example #1
0
    def test_read_smart_ata_hdd(self, mock_popen):
        hwlst = []
        fake_output = sample('smartctl_ata_hdd', mode='rb').splitlines()
        mock_popen.return_value = mock.Mock(stdout=fake_output)
        smart_utils.read_smart_ata(hwlst, 'fake')

        self.assertEqual(hwlst, smart_utils_results.READ_SMART_ATA_HDD_RESULT)
Example #2
0
    def test_read_smart_ata(self, mock_popen):
        hwlst = []
        fake_output = sample('smartctl_ata').splitlines()
        mock_popen.return_value = mock.Mock(stdout=fake_output)
        smart_utils.read_smart_ata(hwlst, 'fake')

        self.assertEqual(hwlst, smart_utils_results.read_smart_ata_result())