File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919fake = faker .Factory .create ()
2020
2121def random_faker ():
22- # The transliteration of arabic names introduces non-alphabetic
23- # characgters that don't work with the draft author extraction code, and
24- # also don't seem to match the way people with arabic names romanize them.
25- locales = set ( [ l for l in faker .config .AVAILABLE_LOCALES if not l .startswith ('ar_' ) ] )
22+ # The transliteration of some arabic and devanagari names introduces
23+ # non-alphabetic characgters that don't work with the draft author
24+ # extraction code, and also don't seem to match the way people with arabic
25+ # names romanize arabic names. Exlude those locales from name generation
26+ # in order to avoid test failures.
27+ locales = set ( [ l for l in faker .config .AVAILABLE_LOCALES if not (l .startswith ('ar_' ) or l .startswith ('sg_' ) ] )
2628 return faker .Faker (random .sample (locales , 1 )[0 ])
2729
2830class UserFactory (factory .DjangoModelFactory ):
You can’t perform that action at this time.
0 commit comments