Getting ./bin/pyl to pass

This commit is contained in:
Jon Herron 2022-11-15 15:56:12 -05:00
parent 5a46cf7fd8
commit b54b3dabb2
2 changed files with 5 additions and 11 deletions

View File

@ -19,7 +19,7 @@ class ProcessInstanceReportFilter:
process_status: Optional[list[str]] = None process_status: Optional[list[str]] = None
def to_dict(self) -> dict[str, str]: def to_dict(self) -> dict[str, str]:
"""to_dict.""" """To_dict."""
d = {} d = {}
if self.process_model_identifier is not None: if self.process_model_identifier is not None:

View File

@ -13,13 +13,13 @@ from spiffworkflow_backend.services.process_instance_report_service import (
ProcessInstanceReportFilter, ProcessInstanceReportFilter,
) )
from spiffworkflow_backend.services.process_instance_report_service import ( from spiffworkflow_backend.services.process_instance_report_service import (
ProcessInstanceReportFilter,
ProcessInstanceReportService, ProcessInstanceReportService,
) )
class TestProcessInstanceReportFilter(BaseTest): class TestProcessInstanceReportFilter(BaseTest):
"""TestProcessInstanceReportFilter.""" """TestProcessInstanceReportFilter."""
def test_empty_filter_to_dict( def test_empty_filter_to_dict(
self, self,
app: Flask, app: Flask,
@ -40,9 +40,7 @@ class TestProcessInstanceReportFilter(BaseTest):
with_super_admin_user: UserModel, with_super_admin_user: UserModel,
) -> None: ) -> None:
"""Docstring.""" """Docstring."""
d = ProcessInstanceReportFilter( d = ProcessInstanceReportFilter(process_model_identifier="bob").to_dict()
process_model_identifier="bob"
).to_dict()
assert d == {"process_model_identifier": "bob"} assert d == {"process_model_identifier": "bob"}
@ -76,9 +74,7 @@ class TestProcessInstanceReportFilter(BaseTest):
with_super_admin_user: UserModel, with_super_admin_user: UserModel,
) -> None: ) -> None:
"""Docstring.""" """Docstring."""
d = ProcessInstanceReportFilter( d = ProcessInstanceReportFilter(process_status=["bob"]).to_dict()
process_status=["bob"]
).to_dict()
assert d == {"process_status": "bob"} assert d == {"process_status": "bob"}
@ -90,9 +86,7 @@ class TestProcessInstanceReportFilter(BaseTest):
with_super_admin_user: UserModel, with_super_admin_user: UserModel,
) -> None: ) -> None:
"""Docstring.""" """Docstring."""
d = ProcessInstanceReportFilter( d = ProcessInstanceReportFilter(process_status=["joe", "bob", "sue"]).to_dict()
process_status=["joe", "bob", "sue"]
).to_dict()
assert d == {"process_status": "joe,bob,sue"} assert d == {"process_status": "joe,bob,sue"}