
    {:&j                     $    d dl mZ d Zd Zd ZdS )    )evaluate_live_preview_preflightc                      t          i           } | j        dk    sJ dD ]}|| j        v sJ | j                            d          sJ d S )N)evidenceFAIL)tests_greencompileall_greenmainnet_readonly_reconciletestnet_alo_canceltestnet_schedule_canceltestnet_fill_stopdata_quality_gateapi_health_handledv76_net_scorecard_gatesnonce_managertelegram_alerts_testedlegacy_autotrader_blockedBLOCK)r   statusfailed_gatesrecommendation
startswith)rgates     $tests/test_preflight_live_preview.py>test_preflight_blocks_missing_required_evidence_and_live_flagsr      sp    '444A8v f & &q~%%%%%&&w///////    c                     |                      dd           |                      dd           d dD             }t          |d          }|j        dk    sJ d	|j        v sJ d S )
NCTB_LIVE_TRADING_ALLOWEDtrueCTB_LIVE_CONFIRMATIONtokenc                     i | ]}|d S T .0ks     r   
<dictcomp>zRtest_preflight_pass_is_only_permission_to_request_sir_approval.<locals>.<dictcomp>   s,      r  r  rA4  r  r  rr   )r   r   r	   r
   r   r    position_without_stop_impossibler   r   r   r   r   secrets_scan_cleanr   r   expected_confirmationPASSzSir may approve)setenvr   r   r   monkeypatchr   r   s      r   >test_preflight_pass_is_only_permission_to_request_sir_approvalr1      s    16:::.888 r  r  "q  r  r  rH'QXYYYA8v 0000000r   c                     |                      dd           |                      dd           d dD             }d|d<   t          |d	          }|j        d
k    sJ d|j        vsJ |j        dk    sJ d S )Nr   r   r    r!   c                     i | ]}|d S r#   r$   r%   s     r   r(   zUtest_preflight_treats_schedule_cancel_volume_limit_as_conditional.<locals>.<dictcomp>   s,      #j  #j  #jq1d  #j  #j  #jr   )r   r   r	   r
   r   r)   r   r   r   r   r   r*   r   4conditional_unavailable_due_to_exchange_volume_limitr   r+   $PASS_WITH_CONDITIONAL_SCHEDULECANCEL)r   )r.   r   r   r   conditional_gatesr/   s      r   Atest_preflight_treats_schedule_cancel_volume_limit_as_conditionalr7      s    16:::.888 #j  #j  5i  #j  #j  #jH*`H&''QXYYYA8=====$AN::::">>>>>>>r   N)src.tools.preflightr   r   r1   r7   r$   r   r   <module>r9      sN    ? ? ? ? ? ?0 0 01 1 1? ? ? ? ?r   