I am new to using the tool django factory boy. I would like to know how can we specify multiple test data patterns for a field in database model using the factory class of django factory boy.
For eg :Username is a field in the table users, username can have variations like abc_123,abc123.
FactoryBoy provides a few options for this:
factory.Faker('user_name')
will provide, for instance: bmiller
, ogarcia
, alee
;factory.fuzzy
module provides some helpers for (managed) random generation. Calling factory.fuzzy.FuzzyText(prefix='abc_')
would generate abc_aCybLgKHOpdI
or abc_pCaddoWBZbEO
;factory/fuzzy.py
;sequence
counter provided to factory.Sequence