From 397a8961a25bf07bccf274eb130d6ec1e7412525 Mon Sep 17 00:00:00 2001 From: Emmanuel Cazenave Date: Thu, 7 Jul 2016 18:33:23 +0200 Subject: [PATCH] Reproduce a deepcopy bug of a Connection instance --- kombu/tests/test_connection.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kombu/tests/test_connection.py b/kombu/tests/test_connection.py index 158e3574..896edf44 100644 --- a/kombu/tests/test_connection.py +++ b/kombu/tests/test_connection.py @@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals import pickle import socket -from copy import copy +from copy import copy, deepcopy from kombu import Connection, Consumer, Producer, parse_url from kombu.connection import Resource @@ -139,6 +139,11 @@ class test_connection_utils(Case): port=5672, virtual_host='/', ) + def test_connection_copy(self): + conn = Connection(self.url, alternates=['amqp://host']) + clone = deepcopy(conn) + self.assertEqual(clone.alt, ['amqp://host']) + class test_Connection(Case):