Fix unit test to handle new Exception

This commit is contained in:
twangboy 2017-09-11 11:30:18 -06:00
parent e3c3845f73
commit a24b964ea5
No known key found for this signature in database
GPG Key ID: 93FF3BDEB278C9EB

View File

@ -36,8 +36,9 @@ class WinFileTestCase(TestCase):
Make sure that an empty dictionary is returned if the file doesn't exist
'''
with patch('os.path.exists', return_value=False):
ret = win_file.stats(self.FAKE_PATH)
self.assertEqual(ret, {})
self.assertRaises(CommandExecutionError,
win_file.stats,
self.FAKE_PATH)
def test_issue_43328_check_perms_ret_passed(self):
'''