reorg test structure to match tox and CI jobs, drop bumpversion for bump-my-version and move config to pyproject.toml, fix docs building

This commit is contained in:
pacrob
2024-04-08 09:06:04 -06:00
committed by Paul Robinson
parent 1206fbef3d
commit eea065fb57
62 changed files with 319 additions and 160 deletions

View File

@ -0,0 +1,24 @@
from libp2p import (
new_swarm,
)
from libp2p.crypto.rsa import (
create_new_key_pair,
)
from libp2p.host.basic_host import (
BasicHost,
)
from libp2p.host.defaults import (
get_default_protocols,
)
def test_default_protocols():
key_pair = create_new_key_pair()
swarm = new_swarm(key_pair)
host = BasicHost(swarm)
mux = host.get_mux()
handlers = mux.handlers
# NOTE: comparing keys for equality as handlers may be closures that do not compare
# in the way this test is concerned with
assert handlers.keys() == get_default_protocols(host).keys()