Add new filter for rendering FileStorage name in case of invalid financial form submission

This commit is contained in:
Montana
2018-08-27 14:22:44 -04:00
parent 6df897191c
commit be080ed205
4 changed files with 30 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ def test_nonexistent_task_order_raises_with_client(monkeypatch):
with pytest.raises(NotFoundError):
TaskOrders.get("some other fake numer")
def test_create_attachment(extended_financial_verification_data):
task_order_data = extended_financial_verification_data.copy()
task_order_data["pdf"] = task_order_data.pop("task_order")

View File

@@ -130,3 +130,18 @@ class TestPENumberInForm:
assert response.status_code == 302
assert "/projects/new" in response.headers.get("Location")
def test_submit_invalid_extended_financial_form(
self, monkeypatch, user_session, client, extended_financial_verification_data
):
request = RequestFactory.create()
monkeypatch.setattr("atst.domain.requests.Requests.get", lambda i: request)
monkeypatch.setattr("atst.forms.financial.validate_pe_id", lambda *args: True)
user_session()
data = {**self.required_data, **extended_financial_verification_data}
data["task_order_number"] = "1234567"
del (data["clin_0001"])
response = self.submit_data(client, data, extended=True)
assert response.status_code == 200