mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-17 02:32:32 -05:00
Upper case only in the random notification id generator
as DVLA need upper case only or the barcode doesn't generate.
This commit is contained in:
@@ -211,7 +211,7 @@ def create_uuid():
|
|||||||
|
|
||||||
|
|
||||||
def create_random_identifier():
|
def create_random_identifier():
|
||||||
return ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(16))
|
return ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(16))
|
||||||
|
|
||||||
|
|
||||||
def process_user_agent(user_agent_string):
|
def process_user_agent(user_agent_string):
|
||||||
|
|||||||
@@ -1044,9 +1044,7 @@ def test_create_dvla_file_contents(sample_letter_template, mocker):
|
|||||||
def test_dvla_letter_template(sample_letter_notification):
|
def test_dvla_letter_template(sample_letter_notification):
|
||||||
t = {"content": sample_letter_notification.template.content,
|
t = {"content": sample_letter_notification.template.content,
|
||||||
"subject": sample_letter_notification.template.subject}
|
"subject": sample_letter_notification.template.subject}
|
||||||
letter = LetterDVLATemplate(t,
|
letter = LetterDVLATemplate(t, sample_letter_notification.personalisation, "random-string")
|
||||||
sample_letter_notification.personalisation,
|
|
||||||
"random-string")
|
|
||||||
assert str(letter) == "140|500|001||random-string|||||||||||||A1||A2|A3|A4|A5|A6|A_POST|||||||||23 March 2017<cr><cr><h1>Template subject<normal><cr><cr>Dear Sir/Madam, Hello. Yours Truly, The Government.<cr><cr>" # noqa
|
assert str(letter) == "140|500|001||random-string|||||||||||||A1||A2|A3|A4|A5|A6|A_POST|||||||||23 March 2017<cr><cr><h1>Template subject<normal><cr><cr>Dear Sir/Madam, Hello. Yours Truly, The Government.<cr><cr>" # noqa
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user