def with_args ( self , * args , * * kwargs ) : self . args = args self . kwargs = kwargs self . verify_arguments ( ) return self
python validate method paramters
Declares that the double can only be called with the provided arguments .
def with_args(self, *args, **kwargs):
        """Declares that the double can only be called with the provided arguments.

        :param args: Any positional arguments required for invocation.
        :param kwargs: Any keyword arguments required for invocation.
        """

        self.args = args
        self.kwargs = kwargs
        self.verify_arguments()
        return self