Formatting fixes

This commit is contained in:
Patrick Smith 2018-08-30 14:23:08 -04:00
parent d785f19b5b
commit 7040157f25
2 changed files with 11 additions and 6 deletions

View File

@ -13,6 +13,7 @@ from atst.forms.data import (
COMPLETION_DATE_RANGES, COMPLETION_DATE_RANGES,
) )
@requests_bp.context_processor @requests_bp.context_processor
def option_data(): def option_data():
return { return {
@ -46,7 +47,9 @@ def requests_form_update(screen=1, request_id=None):
if request_id: if request_id:
_check_can_view_request(request_id) _check_can_view_request(request_id)
request = Requests.get(g.current_user, request_id) if request_id is not None else None request = (
Requests.get(g.current_user, request_id) if request_id is not None else None
)
jedi_flow = JEDIRequestFlow( jedi_flow = JEDIRequestFlow(
screen, request=request, request_id=request_id, current_user=g.current_user screen, request=request, request_id=request_id, current_user=g.current_user
) )
@ -72,7 +75,9 @@ def requests_update(screen=1, request_id=None):
screen = int(screen) screen = int(screen)
post_data = http_request.form post_data = http_request.form
current_user = g.current_user current_user = g.current_user
existing_request = Requests.get(g.current_user, request_id) if request_id is not None else None existing_request = (
Requests.get(g.current_user, request_id) if request_id is not None else None
)
jedi_flow = JEDIRequestFlow( jedi_flow = JEDIRequestFlow(
screen, screen,
post_data=post_data, post_data=post_data,

View File

@ -31,9 +31,7 @@ class TestPENumberInForm:
"atst.forms.financial.FinancialForm.validate", lambda s: True "atst.forms.financial.FinancialForm.validate", lambda s: True
) )
user = UserFactory.create() user = UserFactory.create()
monkeypatch.setattr( monkeypatch.setattr("atst.domain.auth.get_current_user", lambda *args: user)
"atst.domain.auth.get_current_user", lambda *args: user
)
return user return user
def submit_data(self, client, user, data, extended=False): def submit_data(self, client, user, data, extended=False):
@ -108,7 +106,9 @@ class TestPENumberInForm:
self, monkeypatch, user_session, client self, monkeypatch, user_session, client
): ):
user = UserFactory.create() user = UserFactory.create()
monkeypatch.setattr("atst.domain.requests.Requests.get", lambda *args: MOCK_REQUEST) monkeypatch.setattr(
"atst.domain.requests.Requests.get", lambda *args: MOCK_REQUEST
)
user_session(user) user_session(user)
data = dict(self.required_data) data = dict(self.required_data)