Skip to main content
Glama
test_environment.cpython-312-pytest-8.3.4.pyc4.15 kB
� ��g����dZddlZddlmcmZddlZddlZddl m Z d�Z ejjd��Zd�Zy)z)Test environment setup and configuration.�N)� BudgetsApic���d}tj}||v}|s�tjd|fd||f�tj|�dt j �vstjt�rtjt�ndtj|�d�z}tjd�dzd|iz}ttj|���d x}x}}y ) z1Test that required environment variables are set.� YNAB_API_KEY)�in)z/%(py1)s in %(py5)s {%(py5)s = %(py3)s.environ }�os)�py1�py3�py5z'YNAB_API_KEY must be set in environmentz >assert %(py7)s�py7N) r�environ� @pytest_ar�_call_reprcompare� _saferepr� @py_builtins�locals�_should_repr_global_name�_format_assertmsg�AssertionError�_format_explanation)� @py_assert0� @py_assert4� @py_assert2� @py_format6� @py_format8s �I/Users/home/1-Dev-Projects/mcp-servers/ynab-mcp/tests/test_environment.py�test_environment_variablesr s{�� �R�R�Z�Z�R�>�Z� '�R�R�R�>�Z�R�R�R�>�R�R�R�R�R�R�R�R�R�R�R�R�R�R�Z�R�R�R�)R�R�R�R�R�R�R�R�c ��t|�}|j�}|j}|j}d}||u}|s�t j d|fd||f�dt j�vst j|�rt j|�ndt j|�t j|�t j|�d�z}dd|iz}tt j|���dx}x}x}}|j} | j} t| �}d} || kD} | �st j d | fd || f�d t j�vst jt�rt jt�nd dt j�vst j|�rt j|�ndt j| �t j| �t j|�t j| �d �z} d d| iz}tt j|���dx} x} x}x} } y)z)Test that we can connect to the YNAB API.N)�is not)zM%(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.data }.budgets } is not %(py7)s�budgets_response)�py0�py2�py4r zassert %(py9)s�py9r)�>)zg%(py7)s {%(py7)s = %(py0)s(%(py5)s {%(py5)s = %(py3)s {%(py3)s = %(py1)s.data }.budgets }) } > %(py10)s�len)r!rr r r �py10zassert %(py12)s�py12) r� get_budgets�data�budgetsr rrrrrrrr&)� ynab_client� budgets_apir � @py_assert1� @py_assert3� @py_assert6� @py_assert5r� @py_format10rr� @py_assert9� @py_assert8� @py_format11� @py_format13s r�test_ynab_api_connectionr7sn���[�)�K�"�.�.�0�� � � �4� � (� (�4��4� (�� 4�4�4�4� (��4�4�4�4�4�4� �4�4�4� �4�4�4� �4�4�4� (�4�4�4��4�4�4�4�4�4�4��$�$�1�$�,�,�1�3�,� -�1��1� -�� 1�1�1�1� -��1�1�1�1�1�1�3�1�1�1�3�1�1�1�1�1�1��1�1�1��1�1�1�$�1�1�1�,�1�1�1� -�1�1�1��1�1�1�1�1�1�1�1rc��y)zBTest that the preference file is loaded, and if not, returns None.N�r9rr�test_preferences_files_existr:s�r)�__doc__�builtinsr�_pytest.assertion.rewrite� assertion�rewriter r�pytest�ynab.api.budgets_apirr�mark� integrationr7r:r9rr�<module>rDs?��/��� � �+�S� �����2��2�Mr

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Meh-S-Eze/ynab-mcp-client2'

If you have feedback or need assistance with the MCP directory API, please join our Discord server