mirror of https://github.com/celery/kombu.git
Reproduce a deepcopy bug of a Connection instance
This commit is contained in:
parent
91e2c20d7d
commit
397a8961a2
|
@ -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):
|
||||
|
||||
|
|
Loading…
Reference in New Issue