

@mock.patch('nova.rpc.LEGACY_NOTIFIER')
@mock.patch('nova.rpc.NOTIFIER')
def test_emit_notification(self, mock_notifier, mock_legacy):
    mock_context = mock.Mock()
    mock_context.to_dict.return_value = {
        
    }
    self.notification.emit(mock_context)
    self._verify_notification(mock_notifier, mock_context, expected_event_type='test_object.update.start', expected_payload=self.expected_payload)
    self.assertFalse(mock_legacy.called)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/objects/test_notification.py TestNotificationBase.test_emit_notification/original