............F..F......                                                   [100%]
=================================== FAILURES ===================================
___________ test_one_invalid_selected_job_blocks_entire_batch[timer] ___________

app = <fastapi.applications.FastAPI object at 0x10c483e60>, blocker = 'timer'

    @pytest.mark.parametrize('blocker',['active','timer','recurrence','booking','note','unrelated'])
    def test_one_invalid_selected_job_blocks_entire_batch(app,blocker):
        from test_fieldwork import start,base
        from test_recurrence import definition
        from test_scheduling import booking
        from test_workforce import person
        c=client(app);a=merged(app,c);j=a['second'];j=c.get('/api/jobs/'+j['id']).json()
        people=[person(c)]
        if blocker=='active':edit(c,j,status='in_progress')
        elif blocker=='timer':start(c,j,people)
        elif blocker=='recurrence':definition(c,app,j,people[0])
        elif blocker=='booking':booking(c,j,people[0],start_date='2099-01-01',end_date='2099-01-01')
        elif blocker=='note':assert write(c,base(j)+'/logs',{'kind':'note','content':'An unfinished invented review','work_date':'2026-10-28'}).status_code==200
        ids=[a['job']['id'],a['target']['id'] if blocker=='unrelated' else j['id']]
>       p=separation(c,a['merge']['id'],ids);assert not p['can_confirm']
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       assert not True

tests/test_merge_corrections.py:125: AssertionError
___________ test_one_invalid_selected_job_blocks_entire_batch[note] ____________

app = <fastapi.applications.FastAPI object at 0x10cab07a0>, blocker = 'note'

    @pytest.mark.parametrize('blocker',['active','timer','recurrence','booking','note','unrelated'])
    def test_one_invalid_selected_job_blocks_entire_batch(app,blocker):
        from test_fieldwork import start,base
        from test_recurrence import definition
        from test_scheduling import booking
        from test_workforce import person
        c=client(app);a=merged(app,c);j=a['second'];j=c.get('/api/jobs/'+j['id']).json()
        people=[person(c)]
        if blocker=='active':edit(c,j,status='in_progress')
        elif blocker=='timer':start(c,j,people)
        elif blocker=='recurrence':definition(c,app,j,people[0])
        elif blocker=='booking':booking(c,j,people[0],start_date='2099-01-01',end_date='2099-01-01')
>       elif blocker=='note':assert write(c,base(j)+'/logs',{'kind':'note','content':'An unfinished invented review','work_date':'2026-10-28'}).status_code==200
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       AssertionError: assert 404 == 200
E        +  where 404 = <Response [404 Not Found]>.status_code
E        +    where <Response [404 Not Found]> = write(<starlette.testclient.TestClient object at 0x10cab22a0>, ('/api/field/jobs/02f95b997c98c5c9d05497629659c08c' + '/logs'), {'kind': 'note', 'content': 'An unfinished invented review', 'work_date': '2026-10-28'})
E        +      where '/api/field/jobs/02f95b997c98c5c9d05497629659c08c' = <function base at 0x10a098a40>({'id': '02f95b997c98c5c9d05497629659c08c', 'customer_id': '875b087634982cb9ffa603b13650277c', 'service': 'Another shelf', 'message': 'A second invented job for this customer.', ...})

tests/test_merge_corrections.py:123: AssertionError
=========================== short test summary info ============================
FAILED tests/test_merge_corrections.py::test_one_invalid_selected_job_blocks_entire_batch[timer]
FAILED tests/test_merge_corrections.py::test_one_invalid_selected_job_blocks_entire_batch[note]
2 failed, 20 passed, 1 warning in 11.09s
