def METHOD_NAME(self, mock_set_perms_async, mock_set_perms):
    """
    Test rabbitmq connection error.
    """
    mock_set_perms_async.side_effect = OperationalError("connection error")
    self._publish_transportation_form()
    self.assertFalse(mock_set_perms_async.called)
    self.assertTrue(mock_set_perms.called)