Django FactoryBoy: fill modelfield with choices throws error
问题 I am working on a factory for a model and I am trying fill a field that has a list of choices. When I attempt to create an object with the Factory where I attempt to fill in a random choice from the choice list, an exception is thrown: TypeError: 'choice' is an invalid keyword argument for this function Traceback (most recent call last): File "<console>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/factory/base.py", line 551, in build return cls._generate(enums.BUILD