Skip to main content
Glama
test_vm_ip.cpython-313-pytest-8.3.5.pyc4.93 kB
� �hv ��`�SSKrSSKJs Jr SSKrSSKJrJ r SSK J r Sr Sr SrSrSrg) �N)�patch� MagicMock)� get_vm_ipc���[5nSSSSS./00URl[U5nSo!U:Ho3(d�[R "SU4SX45S[ R"5;d[R"U5(a[R"U5OS[R"U5S .-nS S U0-n[[R"U55eS =p2g ) z$Test successful IP address retrieval�eth0�addrsr� 192.168.1.100��type�addr��==�z%(py0)s == %(py3)s�ip��py0�py3�assert %(py5)s�py5N� r�interfaceAddresses� return_valuer� @pytest_ar�_call_reprcompare� @py_builtins�locals�_should_repr_global_name� _saferepr�AssertionError�_format_explanation�� mock_domainr� @py_assert2� @py_assert1� @py_format4� @py_format6s �0/home/steve/projects/kvm-mcp/tests/test_vm_ip.py�test_get_vm_ip_successr(s����+�K�� ��+��� � 3�K�"�"�/� �;� �B� � �� � � � � �2� � � � � � �2� � � � �2� � � �� � � � � � � �c��[5nSS/00URl[U5nSo!ULo3(d�[R "SU4SX45S[ R"5;d[R"U5(a[R"U5OS[R"U5S.-nSS U0-n[[R"U55eS=p2g) z1Test IP retrieval when no addresses are availablerrN��is�z%(py0)s is %(py3)srrrrrr!s r'�test_get_vm_ip_no_addressesr.s����+�K�� �R� �3�K�"�"�/� �;� �B����:�����2�������2�����2�����������r)c���[5nSSSS./0SSSS./0S.URl[U5nSo!U:Ho3(d�[R "SU4SX45S [ R"5;d[R"U5(a[R"U5OS [R"U5S .-nS S U0-n[[R"U55eS =p2g )z2Test IP retrieval with multiple network interfacesrrr r z 10.0.0.100)r�eth1r rrrrrNrr!s r'�"test_get_vm_ip_multiple_interfacesr1$s����+�K� ��+��� � ��(��� �3�K�"�"�/�& �;� �B� � �� � � � � �2� � � � � � �2� � � � �2� � � �� � � � � � � r)c���[5nSSSSS./00URl[U5nSo!ULo3(d�[R "SU4SX45S [ R"5;d[R"U5(a[R"U5OS [R"U5S .-nS S U0-n[[R"U55eS=p2g) z8Test IP retrieval when only IPv6 addresses are availablerr�z 2001:db8::1r Nr+r-rrrrrr!s r'�test_get_vm_ip_ipv6_onlyr4?s����+�K�� ��)��� � 3�K�"�"�/� �;� �B����:�����2�������2�����2�����������r)c���[5n[S5URl[ U5nSo!ULo3(d�[ R "SU4SX45S[R"5;d[ R"U5(a[ R"U5OS[ R"U5S.-nSSU0-n[[ R"U55eS=p2g) z*Test IP retrieval when an exception occursz Test errorNr+r-rrrr) r� Exceptionr� side_effectrrrrrrrrr r!s r'�!test_get_vm_ip_exception_handlingr8Qs����+�K�1:�<�1H�K�"�"�.� �;� �B����:�����2�������2�����2�����������r))�builtinsr�_pytest.assertion.rewrite� assertion�rewriter�pytest� unittest.mockrr�kvm_mcp_serverrr(r.r1r4r8�r)r'�<module>rAs+���� �*�$�!�$ �!�6�$r)

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/steveydevey/kvm-mcp'

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