+
    *j  c                  p    R t ^ RIHt ^ RIt^ RIHu Ht ^ RI	H
t
Ht R tR tR tR tR tR	 tR
 tR tR# )z*Tests for runtime/conversation/session.py.)annotationsN)SessionSessionStorec                    \        R R7      p V P                  R4       V P                  R4       V P                  q! 4       p\	        V4      p^qCV8H  qU'       EgI   \
        P                  ! RV3RW434      RR\        P                  ! 4       9   g!   \
        P                  ! \        4      '       d   \
        P                  ! \        4      MRRR\        P                  ! 4       9   g   \
        P                  ! V 4      '       d   \
        P                  ! V 4      MRR\
        P                  ! V4      R	\
        P                  ! V4      R
\
        P                  ! V4      R\
        P                  ! V4      /,          pRRV/,          p\        \
        P                  ! V4      4      hR;p;p;p;rTV P                  4       ^ ,          R,          pRqV	8H  q'       gy   \
        P                  ! RV3RW34      R\
        P                  ! V4      R\
        P                  ! V	4      /,          p
RRV
/,          p\        \
        P                  ! V4      4      hR;p;rV P                  4       ^,          R,          pRqV	8H  q'       gy   \
        P                  ! RV3RW34      R\
        P                  ! V4      R\
        P                  ! V	4      /,          p
RRV
/,          p\        \
        P                  ! V4      4      hR;p;rR# )test-personaslugHelloz
Greetings.py0lenpy1spy3py5py7py10assert %(py12)spy12Nroleuserpy4zassert %(py6)spy6	assistant==ze%(py7)s
{%(py7)s = %(py0)s(%(py5)s
{%(py5)s = %(py3)s
{%(py3)s = %(py1)s.history
}()
})
} == %(py10)s)z%(py1)s == %(py4)s)r   add_useradd_assistanthistoryr
   
@pytest_ar_call_reprcompare@py_builtinslocals_should_repr_global_name	_safereprAssertionError_format_explanation)r   @py_assert2@py_assert4@py_assert6@py_assert9@py_assert8@py_format11@py_format13@py_assert0@py_assert3@py_format5@py_format7s               C/Users/jameslopez/projects/MentorCore/tests/runtime/test_session.pytest_session_add_messagesr2      s   ^$AJJwOOL!yy y{ 3{ q q           3    3       q    q   y   {      q        99;q>&!+V+V+++++!+++!+++V++++++++99;q>&!0[0[00000!000!000[00000000    c                    \        R R7      p V P                  R4       V P                  4       pVP                  RRRR/4       V P                  q"! 4       p\	        V4      p^qTV8H  qf'       EgI   \
        P                  ! RV3RWE34      RR\        P                  ! 4       9   g!   \
        P                  ! \        4      '       d   \
        P                  ! \        4      MRR	R
\        P                  ! 4       9   g   \
        P                  ! V 4      '       d   \
        P                  ! V 4      MR
R\
        P                  ! V4      R\
        P                  ! V4      R\
        P                  ! V4      R\
        P                  ! V4      /,          pRRV/,          p\        \
        P                  ! V4      4      hR;p;p;p;reR# )r   r   Hir   r   contentextrar	   r
   r   r   r   r   r   r   r   r   Nr   r   )r   r   r   appendr
   r   r   r    r!   r"   r#   r$   r%   )	r   hr&   r'   r(   r)   r*   r+   r,   s	            r1   test_session_history_is_copyr:      s    ^$AJJt			AHHffi12yy y{ 3{ q q           3    3       q    q   y   {      q         r3   c                 d   \        R R7      p V P                  R4       V P                  4        V P                  q! 4       p. q2V8H  qD'       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\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;p;rCR
# )r   r   r   r	   r   py2r   r   zassert %(py9)spy9Nr   )zF%(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.history
}()
} == %(py7)s)r   r   clearr   r   r   r    r!   r"   r#   r$   r%   )r   @py_assert1r.   r(   @py_assert5@py_format8@py_format10s          r1   test_session_clearrC      s    ^$AJJwGGI999;"";119;"r3   c                    \        4       p V P                  R 4      pV P                  q!P                  q2! V4      qDVJ qU'       Egy   \        P
                  ! RV3RWA3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R\        P                  ! V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;p;p;rER# )zmarcus-aureliusr	   storer<   r   r   r   r   r=   assert %(py11)spy11Nis)zi%(py7)s
{%(py7)s = %(py2)s
{%(py2)s = %(py0)s.get
}(%(py5)s
{%(py5)s = %(py3)s.session_id
})
} is %(py9)s)r   createget
session_idr   r   r    r!   r"   r#   r$   r%   )rE   r   r?   r'   r(   r*   rB   @py_format12s           r1   test_store_create_and_getrN       s    NE&'A99'\\'9\"'a'''''"''''''5''''5'''9''''''Q''''Q'''\'''"''''''a''''a'''''''''r3   c                 R   \        4       p V P                  pR q!! V4      pRqCVJ qU'       g   \        P                  ! R
V3RW434      RR\        P
                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MRR\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR;p;p;p;rTR# )nonexistentNr	   rE   r<   r   r   r=   rF   rG   rH   )zI%(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.get
}(%(py4)s)
} is %(py9)s)
r   rK   r   r   r    r!   r"   r#   r$   r%   )rE   r?   r.   r@   r*   @py_assert7rB   rM   s           r1   #test_store_get_missing_returns_nonerR   &   s    NE99+]+9]#+t+t+++++#++++++5++++5+++9+++]+++#+++t+++++++++r3   c                 \   \        4       p V P                  R 4      pV P                  VP                  R 4      pW!J q3'       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R# )
testr	   s2r<   r   zassert %(py4)sr   NrH   )z%(py0)s is %(py2)s)r   rJ   get_or_createrL   r   r   r    r!   r"   r#   r$   r%   )rE   r   rU   r?   @py_format3r/   s         r1   )test_store_get_or_create_returns_existingrX   +   s~    NEVA			Q\\6	2B7NNNN2NNNNNN2NNNN2NNNNNNNNNNNNNNNNNNNr3   c                 z   \        4       p V P                  R R4      pVP                  pRq2V8H  qD'       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\        P                  ! V4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR ;p;rC\        V 4      p^qV8H  q3'       Eg   \        P                  ! RV3RWx34      RR\
        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MR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;r8R # )NrT   r	   r   r<   r   zassert %(py7)sr   r
   r   rE   r   r   zassert %(py8)spy8r   )z,%(py2)s
{%(py2)s = %(py0)s.slug
} == %(py5)s)z0%(py3)s
{%(py3)s = %(py0)s(%(py1)s)
} == %(py6)s)r   rV   r   r   r   r    r!   r"   r#   r$   r%   r
   )rE   r   r?   r'   r.   @py_format6rA   r&   r@   r0   @py_format9s              r1   /test_store_get_or_create_creates_new_if_missingr]   2   s#   NED&)A66VV6116Vu:?:33uu:r3   c                 Z   \        4       p V P                  R 4      pV P                  VP                  4       V P                  q!P                  q2! V4      pRqTVJ qf'       EgA   \
        P                  ! RV3RWE3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R\
        P                  ! V4      R\
        P                  ! V4      R	\
        P                  ! V4      /,          pR
RV/,          p\        \
        P                  ! V4      4      hR;p;p;p;reR# )rT   Nr	   rE   r<   r   r   r   r   r   r   r   rH   )zj%(py7)s
{%(py7)s = %(py2)s
{%(py2)s = %(py0)s.get
}(%(py5)s
{%(py5)s = %(py3)s.session_id
})
} is %(py10)s)r   rJ   deleterL   rK   r   r   r    r!   r"   r#   r$   r%   )	rE   r   r?   r'   r(   r)   r*   r+   r,   s	            r1   test_store_deleter`   9   s    NEVA	LL99*\\*9\"*d*d*****"******5****5***9******Q****Q***\***"***d*********r3   )__doc__
__future__r   builtinsr    _pytest.assertion.rewrite	assertionrewriter   runtime.conversation.sessionr   r   r2   r:   rC   rN   rR   rX   r]   r`    r3   r1   <module>ri      s;    0 "    >1!(,
+r3   