QTZPOC-20
QTZPOC-20: Refactor test calls by extracting inline arguments into local variables for improved readability.
This commit is contained in:
@@ -773,10 +773,11 @@ async def test_a_cancelled_terminal_write_propagates_instead_of_being_reported(
|
||||
@mark.asyncio
|
||||
async def test_a_cancelled_pipeline_failure_report_propagates(import_workflow: ImportModel):
|
||||
patcher = cancelling_activities()
|
||||
error = RuntimeError('boom')
|
||||
try:
|
||||
with raises(asyncio.CancelledError):
|
||||
await import_workflow._report_failure(
|
||||
BASE, RuntimeError('boom'), step=ImportStep.REGISTRATION.value, gate=None
|
||||
BASE, error, step=ImportStep.REGISTRATION.value, gate=None
|
||||
)
|
||||
finally:
|
||||
patcher.stop()
|
||||
@@ -785,9 +786,10 @@ async def test_a_cancelled_pipeline_failure_report_propagates(import_workflow: I
|
||||
@mark.asyncio
|
||||
async def test_a_cancelled_status_write_failure_report_propagates(import_workflow: ImportModel):
|
||||
patcher = cancelling_activities()
|
||||
error = RuntimeError('db down')
|
||||
try:
|
||||
with raises(asyncio.CancelledError):
|
||||
await import_workflow._report_status_write_failure(BASE, RuntimeError('db down'))
|
||||
await import_workflow._report_status_write_failure(BASE, error)
|
||||
finally:
|
||||
patcher.stop()
|
||||
|
||||
@@ -795,9 +797,10 @@ async def test_a_cancelled_status_write_failure_report_propagates(import_workflo
|
||||
@mark.asyncio
|
||||
async def test_a_cancelled_retention_check_propagates(import_workflow: ImportModel):
|
||||
patcher = cancelling_activities()
|
||||
input_data = valid_input()
|
||||
try:
|
||||
with raises(asyncio.CancelledError):
|
||||
await import_workflow._ensure_retention(BASE, valid_input())
|
||||
await import_workflow._ensure_retention(BASE, input_data)
|
||||
finally:
|
||||
patcher.stop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user