From 4aa5ada169b7f2bbfe6626a7774a8b0a081e599d Mon Sep 17 00:00:00 2001
From: Henrik Levkowetz <henrik@levkowetz.com>
Date: Wed, 25 Apr 2018 17:19:48 +0000
Subject: [PATCH] Excluded nepalese from person name locales, to avoid test
 names that contain nonspacing marks that python 2.7 doesn't match to \w,
 which creates urlpattern issues.  - Legacy-Id: 15081

---
 ietf/person/factories.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ietf/person/factories.py b/ietf/person/factories.py
index a9c02c5fb..3b2af33b9 100644
--- a/ietf/person/factories.py
+++ b/ietf/person/factories.py
@@ -24,7 +24,11 @@ def random_faker():
     # 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_')) ] )
+    # 25 Apr 2018: Also exclude nepalese.  Nepalese names can contain
+    # non-spacing marks, which don't match \w; thus there are names that
+    # won't match ^\w+$, which is problematic in some url patterns meant to
+    # match names.
+    locales = set( [ l for l in faker.config.AVAILABLE_LOCALES if not (l.startswith('ar_') or l.startswith('sg_') or l.startswith('ne_')) ] )
     return faker.Faker(random.sample(locales, 1)[0])
 
 class UserFactory(factory.DjangoModelFactory):