[Answer]-Django Factory Boy letter generator

1👍

What about sequence index?

from string import ascii_lowercase

username = factory.Sequence(lambda n: 'user-%r' % ascii_lowercase[n])

Be aware if n > 25 (that is “z”) IndexError will be raised.

Leave a comment