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