def test_call(self, request_definition_builder):
     annotation = arguments.ArgumentAnnotation()
     return_value = annotation(request_definition_builder)
     handler_builder = request_definition_builder.argument_handler_builder
     handler_builder.add_annotation.assert_called_with(annotation)
     assert return_value is request_definition_builder
 def test_add_annotation_class(self, mocker, args):
     builder = arguments.ArgumentAnnotationHandlerBuilder(None, args, False)
     builder.listener = mocker.stub()
     argument = builder.add_annotation(arguments.ArgumentAnnotation())
     builder.listener.assert_called_with(argument)
     assert args[0] not in builder.missing_arguments