pep8 fixes
This commit is contained in:
parent
46ddecc177
commit
9fc8e71f1b
@ -122,12 +122,13 @@ class NotifierTestCase(test.TestCase):
|
|||||||
self.stubs.Set(nova.flags.FLAGS, 'publish_errors', True)
|
self.stubs.Set(nova.flags.FLAGS, 'publish_errors', True)
|
||||||
LOG = log.getLogger('nova')
|
LOG = log.getLogger('nova')
|
||||||
LOG.setup_from_flags()
|
LOG.setup_from_flags()
|
||||||
|
|
||||||
msgs = []
|
msgs = []
|
||||||
|
|
||||||
def mock_cast(context, topic, data):
|
def mock_cast(context, topic, data):
|
||||||
msgs.append(data)
|
msgs.append(data)
|
||||||
|
|
||||||
self.stubs.Set(nova.rpc, 'cast', mock_cast)
|
self.stubs.Set(nova.rpc, 'cast', mock_cast)
|
||||||
LOG.error('foo');
|
LOG.error('foo')
|
||||||
self.assertEqual(1, len(msgs))
|
self.assertEqual(1, len(msgs))
|
||||||
msg = msgs[0]
|
msg = msgs[0]
|
||||||
self.assertEqual(msg['event_type'], 'error_notification')
|
self.assertEqual(msg['event_type'], 'error_notification')
|
||||||
|
Loading…
Reference in New Issue
Block a user