26 lines
689 B
Python
26 lines
689 B
Python
from types import SimpleNamespace
|
|
|
|
from app.services.pl_carrier_service import (
|
|
assert_carrier_eligible_for_transport,
|
|
carrier_eligible_for_transport,
|
|
)
|
|
|
|
|
|
def _carrier(**kwargs):
|
|
base = dict(
|
|
status="1",
|
|
audit_status="pending",
|
|
business_license_urls="",
|
|
road_transport_license_urls="",
|
|
transport_agreement_urls="",
|
|
transport_agreement_expire_date=None,
|
|
)
|
|
base.update(kwargs)
|
|
return SimpleNamespace(**base)
|
|
|
|
|
|
def test_eligible_ignores_audit_qualification_agreement():
|
|
c = _carrier(audit_status="pending")
|
|
assert carrier_eligible_for_transport(c) is True
|
|
assert_carrier_eligible_for_transport(c) # 不抛
|