MCPcopy Index your code
hub / github.com/FactoryBoy/factory_boy / call

Method call

factory/declarations.py:788–806  ·  view source on GitHub ↗
(self, instance, step, context)

Source from the content-addressed store, hash-verified

786 self.method_kwargs = kwargs
787
788 def call(self, instance, step, context):
789 if not context.value_provided:
790 if self.method_arg is NotProvided:
791 args = ()
792 else:
793 args = (self.method_arg,)
794 else:
795 args = (context.value,)
796
797 kwargs = dict(self.method_kwargs)
798 kwargs.update(context.extra)
799 method = getattr(instance, self.method_name)
800 logger.debug(
801 "PostGenerationMethodCall: Calling %r.%s(%s)",
802 instance,
803 self.method_name,
804 utils.log_pprint(args, kwargs),
805 )
806 return method(*args, **kwargs)

Callers

nothing calls this directly

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected