Skip to content

Commit 3b3d18c

Browse files
testcase and fix
1 parent 4c64cdd commit 3b3d18c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

kombu/transport/azureservicebus.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
# dots are replaced by dash, all other punctuation replaced by underscore.
8686
PUNCTUATIONS_TO_REPLACE = set(string.punctuation) - {'_', '.', '-'}
8787
CHARS_REPLACE_TABLE = {
88-
ord('.'): ord('-'),
8988
**{ord(c): ord('_') for c in PUNCTUATIONS_TO_REPLACE}
9089
}
9190

t/unit/transport/test_azureservicebus.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,11 @@ def test_custom_entity_name():
358358
conn = Connection(URL_CREDS_SAS, transport=azureservicebus.Transport)
359359
channel = conn.channel()
360360

361-
# dashes allowed and dots replaced by dashes
361+
# dashes allowed
362362
assert channel.entity_name('test-celery') == 'test-celery'
363-
assert channel.entity_name('test.celery') == 'test-celery'
363+
364+
# dots allowed (cf. https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftservicebus)
365+
assert channel.entity_name('test.celery') == 'test.celery'
364366

365367
# all other punctuations replaced by underscores
366368
assert channel.entity_name('test_celery') == 'test_celery'

0 commit comments

Comments
 (0)