From e85b9e0c8b9d9ddb9c8402ad610559d586f1355f Mon Sep 17 00:00:00 2001 From: epiphyte Date: Sat, 14 Sep 2024 00:56:29 +0000 Subject: [PATCH] move ipv4 test --- synapse/tests/test_model_inet.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/synapse/tests/test_model_inet.py b/synapse/tests/test_model_inet.py index 1979d7c42f..df89e5a2ae 100644 --- a/synapse/tests/test_model_inet.py +++ b/synapse/tests/test_model_inet.py @@ -985,6 +985,12 @@ async def test_ipv4(self): self.len(0, await core.nodes('[test:str="foo"] [inet:ipv4?=$node.value()] -test:str')) self.len(0, await core.nodes('[test:str="foo-bar.com"] [inet:ipv4?=$node.value()] -test:str')) + q = '''init { $l = () } + [inet:ipv4=192.0.0.9 inet:ipv4=192.0.0.0 inet:ipv4=192.0.0.255] $l.append(:type) + fini { return ( $l ) }''' + resp = await core.callStorm(q) + self.eq(resp, ['unicast', 'private', 'private']) + async def test_ipv6(self): formname = 'inet:ipv6' async with self.getTestCore() as core: @@ -3368,15 +3374,3 @@ async def test_model_inet_service(self): :channel -> inet:service:channel +:name="/r/synapse" ''')) - - async def test_model_ipaddress_regression(self): - # TODO DATA MODEL MIGRATION - # TODO IPV6 VARIANT - async with self.getTestCore() as core: - q = ''' - init { $l = () } - [inet:ipv4=192.0.0.9 inet:ipv4=192.0.0.0 inet:ipv4=192.0.0.255] $l.append(:type) - fini { return ( $l ) } - ''' - resp = await core.callStorm(q) - self.eq(resp, ['unicast', 'private', 'private'])