#NEWLINE# @ pytest . mark . parametrize ( [ 'value' , 'expected' ] , [ [ None , [ ] ] , [ '' , [ ] ] , [ six . b ( '\n            filter parent 1: protocol ip pref 1 u32\n            filter parent 1: protocol ip pref 1 u32 fh 801: ht divisor 1\n            filter parent 1: protocol ip pref 1 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:1\n              match c0a8000a/ffffffff at 16\n            filter parent 1: protocol ip pref 2 u32\n            filter parent 1: protocol ip pref 2 u32 fh 800: ht divisor 1\n            filter parent 1: protocol ip pref 2 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:2\n              match 00000000/00000000 at 16\n            ' ) , [ { #NEWLINE# #INDENT# 'flowid' : '1:1' , #NEWLINE# 'network' : '192.168.0.10/32' , #NEWLINE# 'port' : None , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'flowid' : '1:2' , #NEWLINE# 'network' : '0.0.0.0/0' , #NEWLINE# 'port' : None , #NEWLINE# #UNINDENT# } ] ] , [ six . b ( '\n            filter parent 1: protocol ip pref 1 u32\n            filter parent 1: protocol ip pref 1 u32 fh 801: ht divisor 1\n            filter parent 1: protocol ip pref 1 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:1\n              match c0a80000/ffffff00 at 16\n              match 00000050/0000ffff at 20\n            filter parent 1: protocol ip pref 2 u32\n            filter parent 1: protocol ip pref 2 u32 fh 800: ht divisor 1\n            filter parent 1: protocol ip pref 2 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:2\n              match 00000000/00000000 at 16\n            ' ) , [ { #NEWLINE# #INDENT# 'flowid' : '1:1' , #NEWLINE# 'network' : '192.168.0.0/24' , #NEWLINE# 'port' : 80 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'flowid' : '1:2' , #NEWLINE# 'network' : '0.0.0.0/0' , #NEWLINE# 'port' : None , #NEWLINE# #UNINDENT# } ] ] , [ six . b ( '\n            filter parent 1: protocol ip pref 1 u32\n            filter parent 1: protocol ip pref 1 u32 fh 801: ht divisor 1\n            filter parent 1: protocol ip pref 1 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:3\n              match c0a8000a/ffffffff at 12\n              match 00001f90/0000ffff at 20\n            filter parent 1: protocol ip pref 2 u32\n            filter parent 1: protocol ip pref 2 u32 fh 800: ht divisor 1\n            filter parent 1: protocol ip pref 2 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:2\n              match 00000000/00000000 at 12\n            ' ) , [ { #NEWLINE# #INDENT# 'flowid' : '1:3' , #NEWLINE# 'network' : '192.168.0.10/32' , #NEWLINE# 'port' : 8080 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'flowid' : '1:2' , #NEWLINE# 'network' : '0.0.0.0/0' , #NEWLINE# 'port' : None , #NEWLINE# #UNINDENT# } ] ] ] ) #NEWLINE# def test_normal( self , filter_parser , value , expected ) : #NEWLINE# #INDENT# assert ( filter_parser . parse_filter ( value ) == self )