Skip to content

Commit

Permalink
Catch an anticipated DeprecationWarning (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtmckee authored Jun 25, 2024
1 parent be8e211 commit 39d1a2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def test_urlrabbitmq_creates_instances_of_rabbitmq_broker():
url = "amqp://%s:%s@127.0.0.1:5672" % (RABBITMQ_USERNAME, RABBITMQ_PASSWORD)

# When I pass that to URLRabbitmqBroker
broker = URLRabbitmqBroker(url)
with pytest.warns(DeprecationWarning):
broker = URLRabbitmqBroker(url)

# Then I should get back a RabbitmqBroker
assert isinstance(broker, RabbitmqBroker)
Expand Down

0 comments on commit 39d1a2a

Please sign in to comment.