Closed ftnext closed 3 years ago
https://factoryboy.readthedocs.io/en/latest/index.html#realistic-random-values を参考にFakerを使ってランダムな値を生成
https://faker.readthedocs.io/en/latest/providers/faker.providers.lorem.html
LazyFunction
を合わせて使った。参考)https://factoryboy.readthedocs.io/en/latest/fuzzy.html#fuzzychoice
Use import factory.fuzzy to load this module.
https://factoryboy.readthedocs.io/en/latest/introduction.html#strategies
Starting from 2.0, factory.Factory.create() simply calls AssociatedClass(**kwargs). You should use DjangoModelFactory for Django models.
factory.Factory.create() ではDBに保存されないので、動作確認では便利だった
factory_boy を試す
https://kuroneko0208.hatenablog.com/entry/2015/01/25/031727