+
    ,Qjn  c                   v    R t ^ RIt^ RIHu Ht ^ RIt^ RIt^ RI	H
t
 R tR tR tR tR tR tR	 tR
 tR tR# )zPhase-2 phone-power server-side tools: places, contacts, SMS watch, routines.
Memory HTTP is a fake in-memory store; no network. Numbers must never leak.N)FakeMemc                 \    \        4       pV P                  \        R VP                  4       V# )_mem_request)r   setattrphone_storerequest)monkeypatchfakes   & L/Users/ahmed/devFolder/Ultron/claude-voice/gateway/tests/test_phone_tools.py_wirer
   	   s$    9D^T\\BK    c                 	  "   \        V 4       \        P                  ! R RRRR/4      G Rj  xL
 pRq!P                  q3! 4       qBV9   qU'       g   \        P
                  ! R$V3R%W$34      R\        P                  ! V4      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR	\        P                  ! V4      R
\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;p;r4\        P                  ! RRR/4      G Rj  xL
 p. p	RqUV9   q3q#'       d   RqV9   qpV'       Eg   \        P
                  ! R$V3R&WX34      R\        P                  ! V4      R	R\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR/,          pRR
V/,          qiP                  V4       V'       d   \        P
                  ! R$X3R'X
V34      R\        P                  ! V
4      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR/,          pRRV/,          qP                  V4       \        P                  ! V	^ 4      / ,          pRRV/,          p\        \        P                  ! V4      4      hR;p;p	;p;p;r\        P                  ! \        P                   4      G Rj  xL
 p. p	V^ ,          R,          pRpVV8H  q3q#'       d   V^ ,          R,          pRpVV8H  pTpV'       Eg'   \        P
                  ! R(V3R)VV34      R\        P                  ! V4      R\        P                  ! V4      /,          pRRV/,          pV	P                  V4       V'       dl   \        P
                  ! R(X3R*XX34      R\        P                  ! V4      R\        P                  ! V4      /,          pR R!V/,          pV	P                  V4       \        P                  ! V	^ 4      / ,          pR"R#V/,          p\        \        P                  ! V4      4      hR;p;p	;p;p;p;p;ppR#  EL ELm EL5i)+
save_placelabelgymaddress_or_coordsz26.30,50.20Npy1py3outpy5py7assert %(py9)spy9	get_placez26.3z50.2got%(py7)spy10py12%(py14)spy14assert %(py17)spy17latgL:@lnggI@py6z%(py8)spy8py11z%(py16)spy16zassert %(py19)spy19inzD%(py1)s in %(py7)s
{%(py7)s = %(py5)s
{%(py5)s = %(py3)s.lower
}()
}z%(py3)s in %(py5)sz%(py10)s in %(py12)s==)z%(py3)s == %(py6)s)z%(py11)s == %(py14)s)r
   toolsexecutelower
@pytest_ar_call_reprcompare	_saferepr@py_builtinslocals_should_repr_global_nameAssertionError_format_explanationappend_format_boolopr   
list_items
KIND_PLACE)r   r   @py_assert0@py_assert4@py_assert6@py_assert2@py_format8@py_format10r   @py_assert1@py_assert9@py_assert11@py_format6@py_format13@py_format15@py_format16@py_format18items@py_assert5@py_assert10@py_assert13@py_assert12@py_format7@py_format9@py_format17@py_format20s   &                         r	   test_save_place_coords_then_getrU      s    	+l&/BMRT TCIIIKK55CCIKkGU+;<
<C*6*S=**V*s]****6***6******S****S*********Vs***V******s****s****************(()?)?@@E@58E?@e@?e#@@a@5@5(@@@@@?e@@@?@@@e@@@@@@@@@5@@@@@@5@@@@@@@@@@@@@@@@@T =@sX   *SR8BS6BSR;#S3A&SB)SB4S8R>9AS D9S;S>Sc                   "   \        V 4       \        P                  ! R RRRR/4      G Rj  xL
  \        P                  ! RRR/4      G Rj  xL
 pRq"V9   q3'       g   \        P                  ! RV3RW!34      R\        P
                  ! V4      RR	\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P
                  ! V4      MR	/,          pR
RV/,          p\        \        P                  ! V4      4      hR;r#Rp\        P                  ! RRR/4      G Rj  xL
 qbV9   q3'       gy   \        P                  ! RV3RW&34      R\        P
                  ! V4      R\        P
                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;r6R#  EL ELu L5i)r   r   homer   z
12 Palm StNr   r   r   r   assert %(py5)sr   zNo placenowherepy4assert %(py6)sr#   r(   z%(py1)s in %(py3)sz%(py1)s in %(py4)s)r
   r/   r0   r2   r3   r4   r5   r6   r7   r8   r9   )	r   r   r>   rA   @py_format4rG   @py_assert3@py_format5rQ   s	   &        r	   test_save_place_addressra      s    	+
-- &*=|LN N NkGV+<=
=C3<<33Ou}}[7I:NOOOOOOOOO:OOO:OOOOOOOOOOOO	N
=Os<   *GF? GGA7GA*G0G1BGGGc                   "   \        V 4       R p\        P                  ! R/ 4      G Rj  xL
 q!V9   q3'       gy   \        P                  ! RV3RW34      R\        P
                  ! V4      R\        P
                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;r2\        P                  ! RRR	R
R/4      G Rj  xL
  R	p\        P                  ! R/ 4      G Rj  xL
 q!V9   q3'       gy   \        P                  ! RV3RW34      R\        P
                  ! V4      R\        P
                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;r2R#  EL[ L L5i)z	No placeslist_placesNr   rZ   r[   r#   r   r   officer   zTower 1r(   r]   r
   r/   r0   r2   r3   r4   r8   r9   r   r>   r_   rA   r`   rQ   s   &     r	   test_list_placesrg   $   s     	+@mR @@@@@@@@@;@@@;@@@@@@@@@@@@
-- (,?KM M M=U]]="=========8===8============ AM=s5   (FFB*FF F6F
7BFF
Fc                 \  "   \        V 4       R p\        P                  ! RRRRVRR/4      G Rj  xL
 pRq2P                  qD! 4       qSV9   qf'       g   \        P
                  ! R#V3R$W534      R\        P                  ! V4      R	R
\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR
R\        P                  ! V4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;p;rEW9  q'       g   \        P
                  ! R%V	3R&W34      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRRR
\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR
/,          p
RRV
/,          p\        \        P                  ! V4      4      hRp	\        P                  ! RRR/4      G Rj  xL
 pW9  q'       g   \        P
                  ! R%V	3R&W34      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRRR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR/,          p
RRV
/,          p\        \        P                  ! V4      4      hRp	\        P                  q! V4      qDV9   qU'       Egk   \        P
                  ! R#V3R'WL34      RR\        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MRR\        P                  ! V	4      R	R\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR/,          pRRV/,          p\        \        P                  ! V4      4      hR;p	;rE\        P                  ! R/ 4      G Rj  xL
 p. qV9  qq>'       d   RqP                  pV! 4       pVV9   pTpV'       Eg   \        P
                  ! R%V3R(W34      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRRR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR/,          pRRV/,          pV	P                  V4       V'       d   \        P
                  ! R#X3R)XX34      R\        P                  ! V4      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! X4      R\        P                  ! V4      /,          pRRV/,          pV	P                  V4       \        P                  ! V	^ 4      / ,          pR R!V/,          p\        \        P                  ! V4      4      hR;p;p	;p;p;p;pp\        P                   ! \        P"                  R4      G Rj  xL
 pVR,          q3V8H  qf'       g   \        P
                  ! R*V3R+W134      R\        P                  ! V4      R	R\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR/,          pR"RV/,          p\        \        P                  ! V4      4      hR;r6R#  EL EL EL: L5i),
0501234567save_contactnamefathernumberrelationfamilyNr   r   r   r   r   r   r   py0numpy2zassert %(py4)srZ   get_contactr   r/   list_contactslstz%(py6)sr#   r%   py13py15z%(py17)sr    zassert %(py20)spy20rX   r(   r*   not in)z%(py0)s not in %(py2)s)zQ%(py5)s
{%(py5)s = %(py2)s
{%(py2)s = %(py0)s.mask_number
}(%(py3)s)
} in %(py7)s)z%(py2)s not in %(py4)s)zI%(py9)s in %(py15)s
{%(py15)s = %(py13)s
{%(py13)s = %(py11)s.lower
}()
}r-   )z%(py1)s == %(py3)s)r
   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   mask_numberr:   r;   r   get_itemKIND_CONTACT)r   rq   r   r>   r?   r@   rA   rB   rC   rD   @py_format3r`   r   ru   r_   @py_assert8rP   @py_assert14rN   rQ   rJ   rK   @py_format19@py_format21cr^   rG   s   &                          r	   %test_save_contact_never_echoes_numberr   -   s/    	+
Cn%x3)856 6C "yy"y{"{"""""8"""8""""""s""""s"""y"""{"""""""">333ccmfh-?@
@C>333cc(S!(S(((((!((((((5((((5(((((((((S((((S(((!((((((S((((S((((((((or2
2C5c>55h5))5)+5h+5555535555553555535555555c5555c555555555h+555h555555#5555#555)555+5555555555555555"";#;#;XFFAX;#;;##6
 A 3 	Gs   .`,`!B`,:C`,A`, A'`,`$A`,(A`,6C`,9A'`,!A#`,A(`,-`'.5`,$A`,5A`,A`,A'`,.C%`,`*A>`,A`,$`,'`,*`,c                 ~  "   \        V 4       R p\        P                  ! RRR/4      G Rj  xL
 q!V9   q3'       gy   \        P                  ! R	V3R
W34      R\        P
                  ! V4      R\        P
                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;r2R#  L5i)z
No contactrs   rk   ghostNr   rZ   r[   r#   r(   r]   re   rf   s   &     r	   test_get_contact_missingr   ?   sq     	+P}vw>O!PPPPPPPPP<PPP<PPPPPPPPPPPPPs   *B=B;BB=c                   "   \        V 4       \        P                  ! R RR/4      G Rj  xL
  \        P                  ! R RR/4      G Rj  xL
  \        P                  ! R/ 4      G Rj  xL
 p. pRq3V9   qDqT'       d   RqfV9   qwpV'       Eg   \        P                  ! RV3RW134      R\        P
                  ! V4      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P
                  ! V4      MR/,          pR	R
V/,          qP                  V	4       V'       d   \        P                  ! RX3RXV34      R\        P
                  ! V4      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P
                  ! V4      MR/,          p
RRV
/,          qP                  V4       \        P                  ! V^ 4      / ,          pRRV/,          p\        \        P                  ! V4      4      hR;p;p;p;p;rg\        P                  ! RRR/4      G Rj  xL
 pRqUV9   q3'       g   \        P                  ! RV3RW^34      R\        P
                  ! V4      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P
                  ! V4      MR/,          pRRV/,          p\        \        P                  ! V4      4      hR;rSRp\        P                  ! R/ 4      G Rj  xL
 pVV9  q3'       gz   \        P                  ! RV3RVV34      R\        P
                  ! V4      R\        P
                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;ppR#  EL ELt ELX EL| L5i)sms_watch_addsenderz
SNB-AlAhliN*sms_watch_listr   r   ru   r   r   r   r   r   r   r   r    sms_watch_removeStoppedr   rmrX   rZ   r[   r#   r(   r+   r,   r\   ry   )z%(py1)s not in %(py4)s)r
   r/   r0   r2   r3   r4   r5   r6   r7   r:   r;   r8   r9   )r   ru   rD   rA   r?   r>   rE   rF   rG   rB   rH   rI   rJ   rK   r   r^   r_   r`   rQ   s   &                  r	   test_sms_watch_add_list_remover   E   s    	+
--(L)A
BBB
--(C
999.3
3C-<-3--3-#:----<---<------3----3---------3#---3------#----#----------------}}/(L1IJ	JB?99HU]]3CR%HHH<HHHHHH<HHHH<HHHHHHHHHHHH C9
3	JHsu   (O
N< O
N?O
*O+#O
A&O
6B)O
 B)O
	O
A7O
A(O
*O+BO
?O
O
O
O
c                   "   \        V 4       \        P                  ! R RRRRR/RRRRR	//4      G R
j  xL
 pRq!P                  q3! 4       qBV9   qU'       g   \        P
                  ! RV3RW$34      R\        P                  ! V4      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR
;p;p;r4\        P                  ! \        P                  4      G R
j  xL
 p. qV8H  qU'       gy   \        P
                  ! RV3RW(34      R\        P                  ! V4      R\        P                  ! V4      /,          p	RRV	/,          p
\        \        P                  ! V
4      4      hR
;p;rXR
#  EL L5i)routine_createrk   xtriggertypetimeactionspeak_briefbrieftasksNfailedr   r   badr   r   r   r   rZ   r[   r#   r(   r*   r-   )z%(py1)s == %(py4)s)r
   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r   r<   KIND_ROUTINE)r   r   r>   r?   r@   rA   rB   rC   r_   r`   rQ   s   &          r	   test_routine_create_validatesr   Q   s5    	+.Y 06='7;1= > >C "yy"y{"{"""""8"""8""""""s""""s"""y"""{""""""""''(@(@AAGRGRGGGGGAGGGAGGGRGGGGGGGG	> Bs*   2G7G2BG7>B#G7!G5"BG75G7c                 2  a"   \        V 4       . oV3R  lp\        P                  ! V4        \        P                  ! RRRRRRRRR	R
./RRRRR//4      G Rj  xL
 pRq2P                  qD! 4       qSV9   qf'       g   \
        P                  ! R+V3R,W534      R\
        P                  ! V4      RR\        P                  ! 4       9   g   \
        P                  ! V4      '       d   \
        P                  ! V4      MRR\
        P                  ! V4      R\
        P                  ! V4      /,          pRRV/,          p\        \
        P                  ! V4      4      hR;p;p;rE\        P                  ! R/ 4      G Rj  xL
 p	. p
RqfV	9   qDq4'       d   RqV	9   qpV'       Eg   \
        P                  ! R+V3R-Wi34      R\
        P                  ! V4      RR\        P                  ! 4       9   g   \
        P                  ! V	4      '       d   \
        P                  ! V	4      MR/,          pRRV/,          qzP                  V4       V'       d   \
        P                  ! R+X3R.XV	34      R\
        P                  ! V4      RR\        P                  ! 4       9   g   \
        P                  ! V	4      '       d   \
        P                  ! V	4      MR/,          pRRV/,          qP                  V4       \
        P                  ! V
^ 4      / ,          pRR V/,          p\        \
        P                  ! V4      4      hR;p;p
;p;p;r\        P                  ! R!RR/4      G Rj  xL
 pR"q3V9   qf'       g   \
        P                  ! R+V3R/VV34      R\
        P                  ! V4      RR#\        P                  ! 4       9   g   \
        P                  ! V4      '       d   \
        P                  ! V4      MR#/,          pR$RV/,          p\        \
        P                  ! V4      4      hR;r6\        S4      p^pVV8H  qD'       Eg   \
        P                  ! R0V3R1VV34      R%R&\        P                  ! 4       9   g!   \
        P                  ! \        4      '       d   \
        P                  ! \        4      MR&RR'\        P                  ! 4       9   g   \
        P                  ! S4      '       d   \
        P                  ! S4      MR'R\
        P                  ! V4      R(\
        P                  ! V4      /,          pR)R*V/,          p\        \
        P                  ! V4      4      hR;p;pp\        P                  ! R4       R#  EL EL EL!  \        P                  ! R4       i ; i5i)2c                  2   <"   S P                  ^4       R# 5i)   N)r:   )hitss   r	   hook8test_routine_create_list_cancel_fires_hook.<locals>.hook^   s     As   r   rk   zmorning briefr   r   r   atz07:00daysdailyr   r   r   r   Nsetr   r   okr   r   r   r   routine_listru   r   r   r   r   r   r   r    routine_cancel	CancelledcancelrX   rp   lenr   r#   zassert %(py8)sr$   r(   r*   r+   r,   r\   r-   )z0%(py3)s
{%(py3)s = %(py0)s(%(py1)s)
} == %(py6)s)r
   r/   set_routine_hookr0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r   )r   r   r   r>   r?   r@   rA   rB   rC   ru   rD   rE   rF   rG   rH   rI   rJ   rK   r   r^   rM   rQ   rR   r   s   &                      @r	   *test_routine_create_list_cancel_fires_hookr   Z   s    	+D	4 %==!1OgvyIv}gw?4A B B ""
"
"""""u"""u""""""""""""""""
""""""""MM."5588#%88'8S.8888888888888#8888#888888888'S888'888888S8888S8888888888888888}}%57PQQ$f$$$$${f$$${$$$$$$f$$$$f$$$$$$$$4yAyA~yAss44yAt$B
 6Q 	t$s   *V+U< U3BU< #BU< 9U6:#U< A&U< B)U< /B)U< U9A8U< B;U< AU<  A;U< V3U< 6U< 9U< <VV)__doc__builtinsr5   _pytest.assertion.rewrite	assertionrewriter2   r   r/   test_phone_storer   r
   rU   ra   rg   r   r   r   r   r    r   r	   <module>r      sK   O      $AP>$QIH%r   