From 4431c3eac32794ac6b73184032a4e2b5a71675f7 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sun, 14 Jan 2018 18:55:22 +0000 Subject: [PATCH] Exluded another locale from author name generation during testing, due to problematic romanization. - Legacy-Id: 14519 --- ietf/person/factories.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ietf/person/factories.py b/ietf/person/factories.py index 5a4d784b7..3db5709ba 100644 --- a/ietf/person/factories.py +++ b/ietf/person/factories.py @@ -19,10 +19,12 @@ from ietf.person.name import unidecode_name fake = faker.Factory.create() def random_faker(): - # The transliteration of arabic names introduces non-alphabetic - # characgters that don't work with the draft author extraction code, and - # also don't seem to match the way people with arabic names romanize them. - locales = set( [ l for l in faker.config.AVAILABLE_LOCALES if not l.startswith('ar_') ] ) + # The transliteration of some arabic and devanagari names introduces + # non-alphabetic characgters that don't work with the draft author + # extraction code, and also don't seem to match the way people with arabic + # names romanize arabic names. Exlude those locales from name generation + # in order to avoid test failures. + locales = set( [ l for l in faker.config.AVAILABLE_LOCALES if not (l.startswith('ar_') or l.startswith('sg_') ] ) return faker.Faker(random.sample(locales, 1)[0]) class UserFactory(factory.DjangoModelFactory):