python-zaqarclient/zaqarclient/queues/v2
Eva Balycheva 8eaf813984 Do not catch ConflictError on subscription create
Currently 'Subscription' class catches ConflictError inside and prints
text 'The subscriber has been existed already.'.

This is not good for two reasons:
1. The library user(program) wants to handle this exception by himself
using convenient try/except mechanism along with many other exceptions
that can happen during subscription creation.
2. The library user might not want some text to be printed in this
situation by python-zaqarclient. For now this is the only situation when
python-zaqarclient prints something when it is used as library.

This patch makes "Subscription" class not to handle ConflictError
exception by itself. And creates functional and unit tests to assert
that this behavior is raised, when Zaqar returns 409 response code on
subscription creation.

In the future it would be good to list all exceptions that can be raised
by the "Client" class's methods in their docstrings. See
"zaqarclient/queues/v1/client.py" and "zaqarclient/queues/v2/client.py".

Also it would be good if "Pool" and "Flavor" classes would throw
ConflictError exception too.

Closes-Bug: 1542780
Change-Id: I17c0e32a3dabec8303b3055a0d97db857d947b34
2016-02-19 03:28:34 +03:00
..
__init__.py Added support to v2 2015-11-11 06:04:54 +13:00
api.py Add support for subscription create v2 2016-01-11 09:31:55 +13:00
claim.py Added support to claims 2015-12-16 16:42:21 +13:00
cli.py Support claims for v2 2016-02-05 14:02:12 +13:00
client.py Add a way to create a signed URL from a queue 2016-01-20 15:32:45 +01:00
core.py Add a way to create a signed URL from a queue 2016-01-20 15:32:45 +01:00
flavor.py Add flavor support for v2 2015-11-27 13:15:41 -03:00
message.py Refactor the test for v2 queues and messages 2015-12-04 01:55:27 +00:00
pool.py Add pool support for v2 2015-11-27 13:19:03 -03:00
queues.py Add a way to create a signed URL from a queue 2016-01-20 15:32:45 +01:00
subscription.py Do not catch ConflictError on subscription create 2016-02-19 03:28:34 +03:00