Exemple #1
0
 def setUp(self):
     self.socket = mock.Mock()
     self.wrapped = SocketWrapper.wrap_socket(self.socket)
Exemple #2
0
 def setUp(self):
     self.socket = mock.Mock()
     self.wrapped = SocketWrapper.wrap_socket(self.socket)
Exemple #3
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')
Exemple #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')