示例#1
0
文件: test_base.py 项目: mxr/nsq-py
 def setUp(self):
     self.socket = mock.Mock()
     self.wrapped = SocketWrapper.wrap_socket(self.socket)
示例#2
0
 def setUp(self):
     self.socket = mock.Mock()
     self.wrapped = SocketWrapper.wrap_socket(self.socket)
示例#3
0
文件: test_base.py 项目: mxr/nsq-py
 def test_wrap_socket(self):
     '''Passes through objects to the constructor'''
     with mock.patch.object(SocketWrapper, '__init__') as mock_init:
         mock_init.return_value = None
         SocketWrapper.wrap_socket(5, hello='foo')
         mock_init.assert_called_with(5, hello='foo')
示例#4
0
 def test_wrap_socket(self):
     '''Passes through objects to the constructor'''
     with mock.patch.object(SocketWrapper, '__init__') as mock_init:
         mock_init.return_value = None
         SocketWrapper.wrap_socket(5, hello='foo')
         mock_init.assert_called_with(5, hello='foo')