mirror of
https://github.com/GSA/notifications-api.git
synced 2026-06-05 13:58:35 -04:00
Move job processing into celery
- brings boto S3 into new AWS folder - CSV processing utils method Rejigs the jobs rest endpoint - removes some now unused endpoints, Calls to the task with the job, job processing in task, delegating SMS calls to the sms task
This commit is contained in:
15
tests/app/test_csv.py
Normal file
15
tests/app/test_csv.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from app.csv import get_mobile_numbers_from_csv
|
||||
from tests.app import load_example_csv
|
||||
|
||||
|
||||
def test_should_process_single_phone_number_file():
|
||||
sms_file = load_example_csv('sms')
|
||||
len(get_mobile_numbers_from_csv(sms_file)) == 1
|
||||
assert get_mobile_numbers_from_csv(sms_file)[0] == '+441234123123'
|
||||
|
||||
|
||||
def test_should_process_multple_phone_number_file_in_order():
|
||||
sms_file = load_example_csv('multiple_sms')
|
||||
len(get_mobile_numbers_from_csv(sms_file)) == 10
|
||||
assert get_mobile_numbers_from_csv(sms_file)[0] == '+441234123121'
|
||||
assert get_mobile_numbers_from_csv(sms_file)[9] == '+441234123120'
|
||||
Reference in New Issue
Block a user