diff --git a/libp2p/security/insecure_security.py b/libp2p/security/insecure/transport.py similarity index 97% rename from libp2p/security/insecure_security.py rename to libp2p/security/insecure/transport.py index ce3f018..7e1b77e 100644 --- a/libp2p/security/insecure_security.py +++ b/libp2p/security/insecure/transport.py @@ -4,8 +4,7 @@ from libp2p.network.connection.raw_connection_interface import IRawConnection from libp2p.peer.id import ID from libp2p.security.secure_conn_interface import ISecureConn from libp2p.security.secure_transport_interface import ISecureTransport - -from .typing import TSecurityDetails +from libp2p.security.typing import TSecurityDetails class InsecureTransport(ISecureTransport): diff --git a/libp2p/security/secio/__init__.py b/libp2p/security/secio/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/libp2p/security/simple_security.py b/libp2p/security/simple/transport.py similarity index 98% rename from libp2p/security/simple_security.py rename to libp2p/security/simple/transport.py index 4fb0a3c..8860ab5 100644 --- a/libp2p/security/simple_security.py +++ b/libp2p/security/simple/transport.py @@ -5,8 +5,7 @@ from libp2p.network.connection.raw_connection_interface import IRawConnection from libp2p.peer.id import ID from libp2p.security.secure_conn_interface import ISecureConn from libp2p.security.secure_transport_interface import ISecureTransport - -from .typing import TSecurityDetails +from libp2p.security.typing import TSecurityDetails class SimpleSecurityTransport(ISecureTransport): diff --git a/tests/security/test_security_multistream.py b/tests/security/test_security_multistream.py index 070f29d..6abf534 100644 --- a/tests/security/test_security_multistream.py +++ b/tests/security/test_security_multistream.py @@ -1,13 +1,12 @@ import asyncio -import multiaddr -import pytest - from libp2p import new_node from libp2p.peer.peerinfo import info_from_p2p_addr from libp2p.protocol_muxer.multiselect_client import MultiselectClientError -from libp2p.security.insecure_security import InsecureTransport -from libp2p.security.simple_security import SimpleSecurityTransport +from libp2p.security.insecure.transport import InsecureTransport +from libp2p.security.simple.transport import SimpleSecurityTransport +import multiaddr +import pytest from tests.utils import cleanup, connect # TODO: Add tests for multiple streams being opened on different