def METHOD_NAME(self):
    sock = socket.socket()
    with self.assertRaises(TypeError):
        self.service_connection.upload_function(
            function_name='my-function',
            function_zip=sock,
            role='myrole',
            handler='myhandler',
            mode='event',
            runtime='nodejs'
        )