From cfd054fcf41247bff123ae1bb4c6bf2a177ce4ba Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Sun, 27 Aug 2023 03:12:17 +0300 Subject: [PATCH] Check network group of connections in process test if it isn't for i2p --- minode/tests/test_process.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/minode/tests/test_process.py b/minode/tests/test_process.py index a576644..c508a95 100644 --- a/minode/tests/test_process.py +++ b/minode/tests/test_process.py @@ -9,6 +9,8 @@ import time import psutil +from minode.structure import NetAddrNoPrefix + try: socket.socket().bind(('127.0.0.1', 7656)) i2p_port_free = True @@ -102,6 +104,12 @@ class TestProcess(TestProcessProto): if len(self.connections()) > self._connection_limit / 2: _time_to_connect = round(time.time() - _started) break + if '--i2p' not in self._process_cmd: + groups = [] + for c in self.connections(): + group = NetAddrNoPrefix.network_group(c.raddr[0]) + self.assertNotIn(group, groups) + groups.append(group) time.sleep(0.5) else: self.fail(