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.
Reviewed: https:/ /review. openstack. org/272909 /git.openstack. org/cgit/ openstack/ python- zaqarclient/ commit/ ?id=f24a7e9fa32 feb4077883f7a10 180d110ee6edc0
Committed: https:/
Submitter: Jenkins
Branch: master
commit f24a7e9fa32feb4 077883f7a10180d 110ee6edc0
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 .tests. queues. subscriptions. QueuesV2Subscri ptionUnitTest. subscription_ list. This test is missing 'source' keys in response
response body from Zaqar does not represent real response that could
come from Zaqar. As example see
zaqarclient
test_
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 queues. v2.subscription .create_ object /bugs.launchpad .net/python- zaqarclient/ +bug/1538367
all fields of subscription object that was deserialized from Zaqar
response, i.e. checks zaqarclient.
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:/
possible.
Change-Id: Iae5bffb296efd6 55a34584c7f2162 adbe6d029e2
Closes-Bug: 1538366