merge from main and fix test

This commit is contained in:
Kenneth Kehl
2025-04-09 14:18:24 -07:00
22 changed files with 475 additions and 599 deletions

View File

@@ -1,6 +1,6 @@
from unittest.mock import Mock
from app.s3_client.s3_csv_client import set_metadata_on_csv_upload
from app.s3_client.s3_csv_client import remove_blank_lines, set_metadata_on_csv_upload
def test_sets_metadata(client_request, mocker):
@@ -21,3 +21,11 @@ def test_sets_metadata(client_request, mocker):
MetadataDirective="REPLACE",
ServerSideEncryption="AES256",
)
def test_removes_blank_lines():
filedata = {
"data": "phone number\r\n15555555555\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"
}
file_data = remove_blank_lines(filedata)
assert file_data == {"data": "phone number\n15555555555"}

View File

@@ -80,8 +80,7 @@ invalid_us_phone_numbers = sum(
invalid_phone_numbers = [
("+80233456789", "Not a valid country prefix"),
("1234567", "Not enough digits"),
# TODO Fix this one
# ("+682 1234", "Invalid country code"), # Cook Islands phone numbers can be 5 digits
("+682 1234", "Not enough digits"),
("+12345 12345 12345 6", "Too many digits"),
]