Commit 3786dc78 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update get_rex_institute to use non delimiting group

parent f7cdbbb0
...@@ -104,7 +104,7 @@ def get_rex_institute(db, app): ...@@ -104,7 +104,7 @@ def get_rex_institute(db, app):
.replace("+", "\+") .replace("+", "\+")
.replace("?", "\?")) .replace("?", "\?"))
val = r"(^|\|){}($|\|)" .format(val) val = r"(?:^|\|){}(?:$|\|)" .format(val)
lst.append(val) lst.append(val)
......
...@@ -31,10 +31,10 @@ def test_family_name_11001(reccds): ...@@ -31,10 +31,10 @@ def test_family_name_11001(reccds):
def test_get_rex_institue_11002(): def test_get_rex_institue_11002():
val = get_rex_institute(current.db, current.app) val = get_rex_institute(current.db, current.app)
assert val == \ assert val == \
r"(^|\|)Marseille, CPPM($|\|)|" \ r"(?:^|\|)Marseille, CPPM(?:$|\|)|" \
r"(^|\|)CPPM, Marseille($|\|)|" \ r"(?:^|\|)CPPM, Marseille(?:$|\|)|" \
r"(^|\|)Centre de Physique des Particules de Marseille \(CPPM\)($|\|)|" \ r"(?:^|\|)Centre de Physique des Particules de Marseille \(CPPM\)(?:$|\|)|" \
r"(^|\|)Aix Marseille Univ, CNRS/IN2P3, CPPM, Marseille, France($|\|)" r"(?:^|\|)Aix Marseille Univ, CNRS/IN2P3, CPPM, Marseille, France(?:$|\|)"
def test_order_oais_11003(reccds, recins): def test_order_oais_11003(reccds, recins):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment