Comment 2 for bug 1538366

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-zaqarclient (master)

Reviewed: https://review.openstack.org/272909
Committed: https://git.openstack.org/cgit/openstack/python-zaqarclient/commit/?id=f24a7e9fa32feb4077883f7a10180d110ee6edc0
Submitter: Jenkins
Branch: master

commit f24a7e9fa32feb4077883f7a10180d110ee6edc0
Author: Eva Balycheva <email address hidden>
Date: Wed Jan 27 08:03:53 2016 +0300

    Improve subscription listing

    The way subscriptions are listed by Client.subscriptions method is not
    very good. Besides doing nice work, this method modifies subscription
    list response body from Zaqar by adding redundant 'queue_name' key to
    each subscription dictionary in the response body, while there is
    already 'source' key containing queue name.

    Because of that it's possible to write a unit test, where queue list
    response body from Zaqar does not represent real response that could
    come from Zaqar. As example see
    zaqarclient.tests.queues.subscriptions.QueuesV2SubscriptionUnitTest.
    test_subscription_list. This test is missing 'source' keys in response
    body.

    This patch makes subscription listing code stop modifying responses from
    Zaqar. As expected, the example unit test fails after that. This patch
    fixes the test also and checks more subscription object's fields.

    Also this patch improves subscription listing functional test to check
    all fields of subscription object that was deserialized from Zaqar
    response, i.e. checks zaqarclient.queues.v2.subscription.create_object
    method. It is also needed, because before this patch, subscription's
    queue name field wasn't checked by any of the tests, making a recent bug
    like https://bugs.launchpad.net/python-zaqarclient/+bug/1538367
    possible.

    Change-Id: Iae5bffb296efd655a34584c7f2162adbe6d029e2
    Closes-Bug: 1538366