Factory Boy FuzzySubFactory available?

119 Views Asked by At

I am wondering if there is something like FuzzyChoice for Objects.

Background is that I have a base factory and 3 different implementations. Another Factory which uses these factories should randomly choose one of the three implementations. So I did not found that specify FuzzySubFactory within the docs but is there another way to achieve this?

Thanks and regards Matt

1

There are 1 best solutions below

0
On BEST ANSWER

You can just define a list with the desired factories and the use python buidl-in random.choice(items).