Relative Content

Tag Archive for pythonfactory-boy

Factory-boy: use params in a factory.List field

I want to create a factory that will produce a list of dictionaries, and I want to be able to pass an iterable of items to serve as values for one of the items in those dicts, and I want the number of dicts in the list to be equal to the number of the items in the iterable I pass. Here’s what I wrote: