Lines 100-106
def test_formatted(self):
Link Here
|
100 |
|
100 |
|
101 |
# Test state return when block device format fails |
101 |
# Test state return when block device format fails |
102 |
with patch.dict(blockdev.__salt__, {'cmd.run': MagicMock(return_value=mock_ext4), |
102 |
with patch.dict(blockdev.__salt__, {'cmd.run': MagicMock(return_value=mock_ext4), |
103 |
'disk.format_': MagicMock(return_value=True)}): |
103 |
'disk.format': MagicMock(return_value=True)}): |
104 |
comt = ('Failed to format {0}'.format(name)) |
104 |
comt = ('Failed to format {0}'.format(name)) |
105 |
ret.update({'comment': comt, 'result': False}) |
105 |
ret.update({'comment': comt, 'result': False}) |
106 |
with patch.object(salt.utils, 'which', |
106 |
with patch.object(salt.utils, 'which', |