Getting ./bin/pyl to pass
This commit is contained in:
parent
2818056a37
commit
354645a1dc
|
@ -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:
|
||||||
|
|
|
@ -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"}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue