Remove letters-related code (#175)

This deletes a big ol' chunk of code related to letters. It's not everything—there are still a few things that might be tied to sms/email—but it's the the heart of letters function. SMS and email function should be untouched by this.

Areas affected:

- Things obviously about letters
- PDF tasks, used for precompiling letters
- Virus scanning, used for those PDFs
- FTP, used to send letters to the printer
- Postage stuff
This commit is contained in:
Steven Reilly
2023-03-02 20:20:31 -05:00
committed by GitHub
parent b07b95f795
commit ff4190a8eb
141 changed files with 1108 additions and 12083 deletions

View File

@@ -1,7 +1,7 @@
import pytest
from flask import json
from app.models import EMAIL_TYPE, LETTER_TYPE, TEMPLATE_TYPES
from app.models import EMAIL_TYPE, TEMPLATE_TYPES
from tests import create_service_authorization_header
from tests.app.db import create_template
@@ -96,10 +96,8 @@ def test_valid_post_template_returns_200(
assert resp_json['id'] == str(template.id)
if tmp_type in {EMAIL_TYPE, LETTER_TYPE}:
assert expected_subject in resp_json['subject']
if tmp_type == EMAIL_TYPE:
assert expected_subject in resp_json['subject']
assert resp_json['html'] == expected_html
else:
assert resp_json['html'] is None
@@ -107,15 +105,13 @@ def test_valid_post_template_returns_200(
assert expected_content in resp_json['body']
@pytest.mark.parametrize("template_type", (EMAIL_TYPE, LETTER_TYPE))
def test_email_and_letter_templates_not_rendered_into_content(
def test_email_templates_not_rendered_into_content(
client,
sample_service,
template_type,
sample_service
):
template = create_template(
sample_service,
template_type=template_type,
template_type=EMAIL_TYPE,
subject='Test',
content=(
'Hello\n'