
    Zi                         d dl Zd dlmc mZ d dlZd dlZej                  j                  d d       d dl
mZ d dlmZ ej                  d        Zej                   j"                  d        Zy)    Nz!/home/jang/Projects/ai-researcherDataQuerySkill)SkillContextc                      t               S )Nr        E/home/jang/Projects/ai-researcher/tests/unit/test_data_query_skill.pyskillr
   	   s    r   c                   K   t        ddd      }| j                  dddi|       d	{   }d	}||u}|st        j                  d
|fd||f      dt	        j
                         v st        j                  |      rt        j                  |      ndt        j                  |      dz  }dd|iz  }t        t        j                  |            d	x}}d}t        ||      }|sddt	        j
                         v st        j                  t              rt        j                  t              nddt	        j
                         v st        j                  |      rt        j                  |      ndt        j                  |      t        j                  |      dz  }t        t        j                  |            d	x}}|j                  }d	}||u}|st        j                  d
|fd||f      dt	        j
                         v st        j                  |      rt        j                  |      ndt        j                  |      t        j                  |      dz  }dd|iz  }	t        t        j                  |	            d	x}x}}y	7 \w)u   测试查询员工信息user_1tenant_1	trace_123)user_id	tenant_idtrace_idquery_employee_info
departmentu	   技术部)
capabilityparamscontextN)is not)z%(py0)s is not %(py3)sresult)py0py3zassert %(py5)spy5dataz5assert %(py5)s
{%(py5)s = %(py0)s(%(py1)s, %(py3)s)
}hasattr)r   py1r   r   )z0%(py2)s
{%(py2)s = %(py0)s.data
} is not %(py5)s)r   py2r   zassert %(py7)spy7)r   execute
@pytest_ar_call_reprcompare@py_builtinslocals_should_repr_global_name	_safereprAssertionError_format_explanationr   r   )
r
   r   r   @py_assert2@py_assert1@py_format4@py_format6@py_assert4@py_assert3@py_format8s
             r	   test_query_employee_infor1      s     G ==(k* !  F 6666!"766""""""""7"""7""""""6"""6"""6"""""""""";;"d";d"""";d""""""6"""6""";"""d"""""""s   (J	JIJ	)builtinsr$   _pytest.assertion.rewrite	assertionrewriter"   pytestsyspathinsert#src.agent.skills.data_query.handlerr   src.agent.executorr   fixturer
   markasyncior1   r   r   r	   <module>r?      s^       
 6 7 > +   # #r   