Skip to content

Commit 73b501d

Browse files
committed
specifically test for 403
1 parent 35afe12 commit 73b501d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/test_varys.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,11 @@ def tearDown(self):
305305

306306
def test_not_permitted_declare_fail(self):
307307
self.v.send(TEXT, "test-exchange-2", queue_suffix="test_queue")
308-
with self.assertRaises(pika_exceptions.ChannelClosedByBroker) as cm:
308+
with self.assertRaises(pika_exceptions.ChannelClosed) as cm:
309309
self.v.send(TEXT, "test-exchange-2", queue_suffix="test_queue")
310310

311+
self.assertEqual(cm.exception.reply_code, 403)
312+
311313
def test_send_receive_extant_queue(self):
312314
self.v.send(TEXT, "test-exchange", queue_suffix="test_queue")
313315
message = self.v.receive("test-exchange", queue_suffix="test_queue")

0 commit comments

Comments
 (0)