summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmer Katz <omer.drow@gmail.com>2019-03-27 15:51:13 +0200
committerGitHub <noreply@github.com>2019-03-27 15:51:13 +0200
commit5e08ad55b11d6e0135558e45de0ce70d1b143ff2 (patch)
treeeaba9675d448eba2ddd9bb9aa216fdf9c5729472
parent1e742bde1eacf6a6f92df2398828551a23d65ff0 (diff)
downloadkombu-5e08ad55b11d6e0135558e45de0ce70d1b143ff2.tar.gz
Revert "fix/Broadcast-fail-by-give-queue-kwargs (#906)" (#1031)
This reverts commit 87d6423289caa776fc10a8d7cdb3d4b741460cfa.
-rw-r--r--kombu/common.py2
-rw-r--r--t/unit/test_common.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/kombu/common.py b/kombu/common.py
index affebb5a..f86e01a6 100644
--- a/kombu/common.py
+++ b/kombu/common.py
@@ -87,7 +87,7 @@ class Broadcast(Queue):
def __init__(self, name=None, queue=None, auto_delete=True,
exchange=None, alias=None, **kwargs):
- queue = '{0}.{1}'.format(queue or 'bcast', uuid())
+ queue = queue or 'bcast.{0}'.format(uuid())
return super(Broadcast, self).__init__(
alias=alias or name,
queue=queue,
diff --git a/t/unit/test_common.py b/t/unit/test_common.py
index 2a8d1e22..2cbd3d1b 100644
--- a/t/unit/test_common.py
+++ b/t/unit/test_common.py
@@ -80,11 +80,11 @@ class test_Broadcast:
assert q.exchange.type == 'fanout'
q = Broadcast('test_Broadcast', 'explicit_queue_name')
- assert q.name.startswith('explicit_queue_name.')
+ assert q.name == 'explicit_queue_name'
assert q.exchange.name == 'test_Broadcast'
q2 = q(Mock())
- assert q2.name.split('.')[0] == q.name.split('.')[0]
+ assert q2.name == q.name
class test_maybe_declare: