From fcfb9f73b62cc435348ebdd69e0ce13ca6051265 Mon Sep 17 00:00:00 2001
From: Nicolas ROCHE <nroche@entrouvert.com>
Date: Sun, 18 Dec 2022 11:07:40 +0100
Subject: [PATCH 6/7] toulouse-maelis: provide sectorization on RL1 (#72352)

---
 functests/toulouse_maelis/conftest.py                  | 7 ++++++-
 functests/toulouse_maelis/data/test_create_family.json | 7 ++++---
 functests/toulouse_maelis/data/test_update_family.json | 7 ++++---
 functests/toulouse_maelis/data/test_update_rl1.json    | 7 ++++---
 functests/toulouse_maelis/test_family.py               | 2 +-
 5 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/functests/toulouse_maelis/conftest.py b/functests/toulouse_maelis/conftest.py
index bb5a94fc..6aa9f2c0 100644
--- a/functests/toulouse_maelis/conftest.py
+++ b/functests/toulouse_maelis/conftest.py
@@ -17,17 +17,22 @@ FAMILY_PAYLOAD = {
     'situation': 'MARI',
     'rl1': {
         'civility': 'MME',
         'firstname': 'Marge',
         'lastname': 'Simpson',
         'maidenName': 'Bouvier',
         'quality': 'MERE',
         'birth': {'dateBirth': '1950-10-01'},
-        'adresse': {'street1': 'Evergreen Terrace', 'town': 'Springfield', 'zipcode': '62701'},
+        'adresse': {
+            'idStreet': '161',
+            'street1': 'requeried having idStreet provided',
+            'town': 'Springfield',
+            'zipcode': '62701',
+        },
     },
     'rl2': {
         'civility': 'MR',
         'firstname': 'Homer',
         'lastname': 'Simpson',
         'quality': 'PERE',
         'birth': {'dateBirth': '1956-05-12'},
         'adresse': {
diff --git a/functests/toulouse_maelis/data/test_create_family.json b/functests/toulouse_maelis/data/test_create_family.json
index 74318748..b6723d23 100644
--- a/functests/toulouse_maelis/data/test_create_family.json
+++ b/functests/toulouse_maelis/data/test_create_family.json
@@ -15,23 +15,24 @@
     "civility": "MME",
     "birth": {
       "dateBirth": "1950-10-01T00:00:00+01:00",
       "place": null,
       "communeCode": null,
       "countryCode": null
     },
     "adresse": {
-      "idStreet": null,
+      "idStreet": "161",
       "num": 0,
       "numComp": null,
-      "street1": "Evergreen Terrace",
+      "street1": "IMP DES ANGES",
       "street2": null,
       "town": "Springfield",
-      "zipcode": "62701"
+      "zipcode": "62701",
+      "idStreet_text": "IMP DES ANGES"
     },
     "contact": {
       "phone": null,
       "mobile": null,
       "mail": null,
       "isContactMail": false,
       "isContactSms": false,
       "isInvoicePdf": false
diff --git a/functests/toulouse_maelis/data/test_update_family.json b/functests/toulouse_maelis/data/test_update_family.json
index 17697363..10304f59 100644
--- a/functests/toulouse_maelis/data/test_update_family.json
+++ b/functests/toulouse_maelis/data/test_update_family.json
@@ -15,23 +15,24 @@
     "civility": "MME",
     "birth": {
       "dateBirth": "1950-10-01T00:00:00+01:00",
       "place": null,
       "communeCode": null,
       "countryCode": null
     },
     "adresse": {
-      "idStreet": null,
+      "idStreet": "161",
       "num": 0,
       "numComp": null,
-      "street1": "Evergreen Terrace",
+      "street1": "IMP DES ANGES",
       "street2": null,
       "town": "Springfield",
-      "zipcode": "62701"
+      "zipcode": "62701",
+      "idStreet_text": "IMP DES ANGES"
     },
     "contact": {
       "phone": null,
       "mobile": null,
       "mail": null,
       "isContactMail": false,
       "isContactSms": false,
       "isInvoicePdf": false
diff --git a/functests/toulouse_maelis/data/test_update_rl1.json b/functests/toulouse_maelis/data/test_update_rl1.json
index 98f6b0f3..976443a6 100644
--- a/functests/toulouse_maelis/data/test_update_rl1.json
+++ b/functests/toulouse_maelis/data/test_update_rl1.json
@@ -7,23 +7,24 @@
   "civility": "MME",
   "birth": {
     "dateBirth": "1950-10-01T00:00:00+01:00",
     "place": null,
     "communeCode": null,
     "countryCode": null
   },
   "adresse": {
-    "idStreet": null,
+    "idStreet": "161",
     "num": 0,
     "numComp": null,
-    "street1": "Evergreen Terrace",
+    "street1": "IMP DES ANGES",
     "street2": null,
     "town": "Springfield",
-    "zipcode": "62701"
+    "zipcode": "62701",
+    "idStreet_text": "IMP DES ANGES"
   },
   "contact": {
     "phone": null,
     "mobile": null,
     "mail": null,
     "isContactMail": false,
     "isContactSms": false,
     "isInvoicePdf": false
diff --git a/functests/toulouse_maelis/test_family.py b/functests/toulouse_maelis/test_family.py
index e2a8be37..bfefb5b2 100644
--- a/functests/toulouse_maelis/test_family.py
+++ b/functests/toulouse_maelis/test_family.py
@@ -10,17 +10,17 @@ FAMILY_RESET_PAYLOAD = {
     'situation': 'AUTR',
     'rl1': {
         'civility': 'MR',  # no effect
         'firstname': 'Marge',  # must be
         'lastname': 'Simpson',  # must be
         'maidenName': 'reset',  # no effect
         'quality': '25',
         'birth': {'dateBirth': '1950-10-01'},  # must be
-        'adresse': {'street1': 'reset', 'town': 'reset', 'zipcode': 'reset'},
+        'adresse': {'idStreet': None, 'street1': 'reset', 'town': 'reset', 'zipcode': 'reset'},
     },
     'rl2': {
         'civility': 'MME',  # no effect
         'firstname': 'Homer',  # must be
         'lastname': 'Simpson',  # must be
         'quality': '25',
         'birth': {'dateBirth': '1956-05-12'},  # must be
         'adresse': {
-- 
2.30.2

