fix logging tests

This commit is contained in:
Alan Hamlett 2015-10-22 23:21:32 -07:00
parent ca5bb35bbb
commit fdc2981e74

View file

@ -119,7 +119,7 @@ class LoggingTestCase(utils.TestCase):
args = ['--file', entity, '--config', config, '--time', now] args = ['--file', entity, '--config', config, '--time', now]
with utils.mock.patch('wakatime.stats.open') as mock_open: with utils.mock.patch('wakatime.stats.open') as mock_open:
mock_open.side_effect = IOError('FooBar') mock_open.side_effect = Exception('FooBar')
retval = execute(args) retval = execute(args)
self.assertEquals(retval, 102) self.assertEquals(retval, 102)
@ -128,4 +128,4 @@ class LoggingTestCase(utils.TestCase):
output = u("\n").join([u(' ').join(x) for x in logs.actual()]) output = u("\n").join([u(' ').join(x) for x in logs.actual()])
self.assertIn(u('WakaTime ERROR Traceback (most recent call last):'), output) self.assertIn(u('WakaTime ERROR Traceback (most recent call last):'), output)
self.assertIn(u('IOError: FooBar'), output) self.assertIn(u('Exception: FooBar'), output)