Skip to content

Commit

Permalink
Merge pull request #301 from biocore/csymons_po_boxes
Browse files Browse the repository at this point in the history
Block PO Boxes
  • Loading branch information
cassidysymons authored Dec 6, 2023
2 parents e17b1da + f37deae commit 716f1fb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
16 changes: 12 additions & 4 deletions microsetta_interface/implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 '
Expand Down Expand Up @@ -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': '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 '
Expand Down Expand Up @@ -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': '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 '
Expand All @@ -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.'
},
}

Expand Down
5 changes: 3 additions & 2 deletions microsetta_interface/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 716f1fb

Please sign in to comment.