Skip to main content
Glama

web-browser-mcp-server

test_server.cpython-311-pytest-8.0.0.pyc8.66 kB
� !�Kg�����ddlZddlmcmZddlZddlmZm Z ddl m Z ej j d���Z ej j d���Zej j d���ZdS)�N)� list_tools� call_tool)� aioresponsesc��K�t���d{V��}t|��}d}||k}|s�tjd|fd||f��dt j��vstjt��rtjt��nddt j��vstj|��rtj|��ndtj|��tj|��d�z}dd|iz}ttj |�����dx}x}}|d }|j }d }||k}|stjd|fd ||f��tj|��tj|��tj|��d �z}dd|iz}ttj |�����dx}x}x}}d }|d j d}||v}|sltjd|fd||f��tj|��tj|��d�z}dd|iz}ttj |�����dx}x}}dS)N���==�z0%(py3)s {%(py3)s = %(py0)s(%(py1)s) } == %(py6)s�len�tools��py0�py1�py3�py6�assert %(py8)s�py8r�browse_webpage)z,%(py3)s {%(py3)s = %(py1)s.name } == %(py6)s)rrr�url� properties��in)z%(py1)s in %(py4)s)r�py4zassert %(py6)sr) rr � @pytest_ar�_call_reprcompare� @py_builtins�locals�_should_repr_global_name� _saferepr�AssertionError�_format_explanation�name� inputSchema) r � @py_assert2� @py_assert5� @py_assert4� @py_format7� @py_format9� @py_assert0� @py_assert3� @py_format5s �J/Users/josephblazick/Documents/web-browser-mcp-server/tests/test_server.py�test_list_toolsr-s������,�,� � � � � � �E����������������������������������������������������������������������������������������������������,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�6�c��K�tdi���d{V��}t|��}d}||k}|s�tjd|fd||f��dt j��vstjt��rtjt��nddt j��vstj|��rtj|��ndtj|��tj|��d�z}dd |iz}ttj |�����dx}x}}d }|d }|j }||v}|stjd |fd ||f��tj|��tj|��tj|��d�z}dd |iz}ttj |�����dx}x}x}}dS)N� invalid_toolrrr r �resultr rrzError: Unknown toolrr)z,%(py1)s in %(py6)s {%(py6)s = %(py4)s.text })rrr) rr rrrrrrr r!�text)r1r$r%r&r'r(r)r*s r,�test_call_tool_invalidr3s"�����^�R�0�0� 0� 0� 0� 0� 0� 0�F����������������������������������������������������������������������������������������������������2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2�2r.c���K�d}t��5}|�dd|���tddddid����d{V��}t|��}d }||k}|s�t jd |fd ||f��d t j��vst jt��rt j t��nd d t j��vst j|��rt j |��nd t j |��t j |��d�z}dd|iz}tt j |�����dx}x}}|dj }d} | |v}|s�t jd|fd| |f��t j | ��dt j��vst j|��rt j |��ndd�z} dd| iz} tt j | �����dx} }d} | |v}|s�t jd|fd| |f��t j | ��dt j��vst j|��rt j |��ndd�z} dd| iz} tt j | �����dx} }d} | |v}|s�t jd|fd| |f��t j | ��dt j��vst j|��rt j |��ndd�z} dd| iz} tt j | �����dx} }ddd��dS#1swxYwYdS)Nz� <html> <head><title>Test Page</title></head> <body> <a href="https://test.com">Test Link</a> <div class="content">Test Content</div> </body> </html> zhttps://test.com��)�status�bodyr�contentz.content)r� selectorsrrr r r1r rrrz Test Pager)z%(py1)s in %(py3)s)rrzassert %(py5)s�py5z Test Linkz Test Content) r�getrr rrrrrrr r!r2) � mock_html�mr1r$r%r&r'r(r8r)� @py_format4� @py_format6s r,�test_browse_webpager@sd�����I� ��� )�1� ��� ��9��=�=�=� � �&�i��5L� M� M� � � � � � � � �� �����������������������������������������������������������������������������������������������������)�.��%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�%�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(� )� )� )� )� )� )� )� )� )� )� )� )���� )� )� )� )� )� )s�L;M�M�"M)�builtinsr�_pytest.assertion.rewrite� assertion�rewriter�pytest�web_browser_mcp_server.serverrrr�mark�asyncior-r3r@�r.r,�<module>rJs���������������� � � � �?�?�?�?�?�?�?�?�%�%�%�%�%�%����7�7���7����3�3���3� ���)�)���)�)�)r.

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/blazickjp/web-browser-mcp-server'

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