From 367ea85e4cda5b30383a5f5cf916d58eddc56dc4 Mon Sep 17 00:00:00 2001 From: Cassidy Symons Date: Thu, 30 Nov 2023 12:37:41 -0800 Subject: [PATCH 1/3] Add error message for PO Boxes --- microsetta_interface/implementation.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/microsetta_interface/implementation.py b/microsetta_interface/implementation.py index 7c1dac11..e033f938 100644 --- a/microsetta_interface/implementation.py +++ b/microsetta_interface/implementation.py @@ -179,7 +179,9 @@ class Source: 'Contract) Box number is missing.', 'AE14': 'US Only. The address is a Commercial Mail Receiving Agency ' '(CMRA) and the Private Mail Box (PMB or #) number is ' - 'missing.' + 'missing.', + 'AEPOBOX': 'PO Boxes are not permitted. Please enter a physical ' + 'address.' }, ES_MX_KEY: { 'AE01': 'La dirección no se pudo verificar al menos hasta el nivel ' @@ -209,7 +211,9 @@ class Source: 'rural) o HC (Contrato de carretera).', 'AE14': 'La dirección es una Agencia receptora de correo comercial ' '(CMRA) y falta el número del buzón de correo privado (PMB ' - 'o #).' + 'o #).', + 'AEPOBOX': 'PO Boxes are not permitted. Please enter a physical ' + 'address.' }, ES_ES_KEY: { 'AE01': 'La dirección no se pudo verificar al menos hasta el nivel ' @@ -239,7 +243,9 @@ class Source: 'rural) o HC (Contrato de carretera).', 'AE14': 'La dirección es una Agencia receptora de correo comercial ' '(CMRA) y falta el número del buzón de correo privado (PMB ' - 'o #).' + 'o #).', + 'AEPOBOX': 'PO Boxes are not permitted. Please enter a physical ' + 'address.' }, JA_JP_KEY: { 'AE01': 'The address could not be verified at least up to the postal ' @@ -266,7 +272,9 @@ class Source: 'Contract) Box number is missing.', 'AE14': 'US Only. The address is a Commercial Mail Receiving Agency ' '(CMRA) and the Private Mail Box (PMB or #) number is ' - 'missing.' + 'missing.', + 'AEPOBOX': 'PO Boxes are not permitted. Please enter a physical ' + 'address.' }, } From 3ef12bd98b639cc38eed213f60b818d51e2c2981 Mon Sep 17 00:00:00 2001 From: Cassidy Symons Date: Wed, 6 Dec 2023 15:22:43 -0800 Subject: [PATCH 2/3] Spanish translation for PO Box error --- microsetta_interface/implementation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/microsetta_interface/implementation.py b/microsetta_interface/implementation.py index e033f938..c5785a83 100644 --- a/microsetta_interface/implementation.py +++ b/microsetta_interface/implementation.py @@ -212,8 +212,8 @@ class Source: 'AE14': 'La dirección es una Agencia receptora de correo comercial ' '(CMRA) y falta el número del buzón de correo privado (PMB ' 'o #).', - 'AEPOBOX': 'PO Boxes are not permitted. Please enter a physical ' - 'address.' + 'AEPOBOX': 'No se permiten PO Boxes. Por favor ingrese una dirección ' + 'física.' }, ES_ES_KEY: { 'AE01': 'La dirección no se pudo verificar al menos hasta el nivel ' @@ -244,8 +244,8 @@ class Source: 'AE14': 'La dirección es una Agencia receptora de correo comercial ' '(CMRA) y falta el número del buzón de correo privado (PMB ' 'o #).', - 'AEPOBOX': 'PO Boxes are not permitted. Please enter a physical ' - 'address.' + 'AEPOBOX': 'No se permiten PO Boxes. Por favor ingrese una dirección ' + 'física.' }, JA_JP_KEY: { 'AE01': 'The address could not be verified at least up to the postal ' From f37deae3af8ea4c423c7af5350d77e12c318bd20 Mon Sep 17 00:00:00 2001 From: Cassidy Symons Date: Wed, 6 Dec 2023 15:28:04 -0800 Subject: [PATCH 3/3] Fix sample date in integration test --- microsetta_interface/tests/test_integration.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/microsetta_interface/tests/test_integration.py b/microsetta_interface/tests/test_integration.py index af418297..1278c6cd 100644 --- a/microsetta_interface/tests/test_integration.py +++ b/microsetta_interface/tests/test_integration.py @@ -398,10 +398,11 @@ def test_new_human_source_to_sample(self): self.assertPageTitle(resp, 'My Kits') # set collection info + cur_date = datetime.datetime.now().strftime("%-m/%-d/%Y") collection_note = 'SAMPLE COLLECTED BY INTEGRATION TESTING' body = {'sample': TEST_KIT_1_SAMPLE_1_BARCODE, - 'sample_date': '1/1/2022', - 'sample_date_normalized': '1/1/2022', + 'sample_date': cur_date, + 'sample_date_normalized': cur_date, 'sample_time': '07:00 AM', 'sample_site': 'Stool', 'sample_notes': collection_note}