def METHOD_NAME(self, cmd_output, expected_delete_count, expected_kept_events):
    self.assertIn('Dry run requested', cmd_output)
    if expected_delete_count == 0:
        delete_text = 'No events older than'
    else:
        delete_text = 'Would delete {} event'.format(expected_delete_count)
    self.assertIn(delete_text, cmd_output)
    self.assertCountEqual(
        PersonApiKeyEvent.objects.all(),
        expected_kept_events,
        'Events were deleted when dry-run option was used'
    )