格式:统一使用业务代码 Ruff 格式

This commit is contained in:
焦龙言
2026-07-27 15:59:09 +08:00
parent 37c94b6713
commit 684dd451bb
2 changed files with 3 additions and 9 deletions
@@ -581,9 +581,7 @@ class TestUsageControllerContract(unittest.TestCase):
response_schema = schema['components']['schemas'][post_response_schema['$ref'].rsplit('/', 1)[-1]]
self.assertIn('data', response_schema['properties'])
self.assertIn('data', response_schema['required'])
data_schema = schema['components']['schemas'][
response_schema['properties']['data']['$ref'].rsplit('/', 1)[-1]
]
data_schema = schema['components']['schemas'][response_schema['properties']['data']['$ref'].rsplit('/', 1)[-1]]
self.assertEqual(
{'usageId', 'remainingPackages', 'flowState'},
set(data_schema['properties']),
@@ -1472,9 +1470,7 @@ class TestUsageIdempotency(unittest.IsolatedAsyncioTestCase):
),
)
expected_state = (
PalletFlowState.AT_SITE_EMPTY
if remaining_after == 0
else PalletFlowState.AT_SITE_PARTIAL
PalletFlowState.AT_SITE_EMPTY if remaining_after == 0 else PalletFlowState.AT_SITE_PARTIAL
)
self.assertIsInstance(result.result, UsageSuccessResponseModel)
self.assertEqual(