Skip to content

Commit

Permalink
move ipv4 test
Browse files Browse the repository at this point in the history
  • Loading branch information
vEpiphyte committed Sep 14, 2024
1 parent d413350 commit e85b9e0
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions synapse/tests/test_model_inet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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'])

0 comments on commit e85b9e0

Please sign in to comment.