

def _verify_notification(self, mock_notifier, mock_context, expected_event_type, expected_payload):
    actual_payload.prepare.assert_called_once_with(publisher_id='nova-fake:fake-host')
    mock_notify = mock_notifier.prepare.return_value.info
    self.assertTrue(mock_notify.called)
    self.assertEqual(mock_notify.call_args[0][0], mock_context)
    self.assertEqual(mock_notify.call_args[1]['event_type'], expected_event_type)
    actual_payload = mock_notify.call_args[1]['payload']
    self.assertJsonEqual(expected_payload, actual_payload)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/objects/test_notification.py TestNotificationBase._verify_notification/VarMisuse@18/31 `mock_notifier`->`actual_payload`