

@mock.patch('nova.rpc.NOTIFIER')
def test_empty_schema(self, mock_notifier):
    non_populated_payload = self.TestNotificationPayloadEmptySchema(extra_field='test string')
    noti = self.TestNotificationEmptySchema(event_type=notification.EventType(object='test_object', action=fields.NotificationAction.UPDATE), publisher=notification.NotificationPublisher.from_service_obj(self.service_obj), priority=fields.NotificationPriority.INFO, payload=non_populated_payload)
    mock_context = mock.Mock()
    mock_context.to_dict.return_value = {
        
    }
    noti.emit(self)
    self._verify_notification(mock_notifier, mock_context, expected_event_type='test_object.update', expected_payload={
        'nova_object.name': 'TestNotificationPayloadEmptySchema',
        'nova_object.data': {
            'extra_field': 'test string',
        },
        'nova_object.version': '1.0',
        'nova_object.namespace': 'nova',
    })

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/objects/test_notification.py TestNotificationBase.test_empty_schema/VarMisuse@105/160 `mock_context`->`self`