Fix all tests

- Dedup `perform_test_from_obj` and the test cases used in both
`test_floodsub` and `test_gossipsub_backward_compatibility.py`.
Therefore, they are put in the standalone file
`tests/pubsub/floodsub_integration_test_settings.py`. The functions
and testcases are imported from there then.
- IMO still need a refactor on the tests. There are still some duplicate
code.
This commit is contained in:
mhchia
2019-07-27 11:49:03 +08:00
parent 65aedcb25a
commit c028aef2de
8 changed files with 526 additions and 962 deletions

View File

@ -8,9 +8,13 @@ from tests.utils import (
connect,
)
from .utils import message_id_generator, generate_RPC_packet, \
create_libp2p_hosts, create_pubsub_and_gossipsub_instances, sparse_connect, dense_connect, \
one_to_all_connect
from .utils import (
create_libp2p_hosts,
create_pubsub_and_gossipsub_instances,
dense_connect,
one_to_all_connect,
)
SUPPORTED_PROTOCOLS = ["/gossipsub/1.0.0"]