Reproduce a deepcopy bug of a Connection instance

This commit is contained in:
Emmanuel Cazenave 2016-07-07 18:33:23 +02:00 committed by Ask Solem
parent 91e2c20d7d
commit 397a8961a2
1 changed files with 6 additions and 1 deletions

View File

@ -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):