mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
36 lines
736 B
Python
36 lines
736 B
Python
#!/usr/bin/env python3
|
|
import hive
|
|
import pytest
|
|
|
|
@pytest.fixture(scope="session")
|
|
def HiveTenRTenC():
|
|
router_hive = hive.RouterHive(n_relays=10, n_clients=10, netid="hive")
|
|
router_hive.Start()
|
|
|
|
yield router_hive
|
|
|
|
router_hive.Stop()
|
|
|
|
@pytest.fixture(scope="session")
|
|
def HiveThirtyRTenC():
|
|
router_hive = hive.RouterHive(n_relays=30, n_clients=10, netid="hive")
|
|
router_hive.Start()
|
|
|
|
yield router_hive
|
|
|
|
router_hive.Stop()
|
|
|
|
@pytest.fixture()
|
|
def HiveArbitrary():
|
|
router_hive = None
|
|
def _make(n_relays=10, n_clients=10, netid="hive"):
|
|
nonlocal router_hive
|
|
router_hive = hive.RouterHive(n_relays=30, n_clients=10, netid="hive")
|
|
router_hive.Start()
|
|
return router_hive
|
|
|
|
yield _make
|
|
|
|
router_hive.Stop()
|
|
|