@@ -109,7 +109,8 @@ def test_and_or(self):
109109
110110 def test_priority (self ):
111111 inclusion = Inclusion ({'PRIORITY' : 'err' })
112- assert inclusion .matches ({'PRIORITY' : 3 })
112+ priority_type = journal .DEFAULT_CONVERTERS .get ('PRIORITY' , str )
113+ assert inclusion .matches ({'PRIORITY' : priority_type (3 )})
113114
114115 def test_repr (self ):
115116 incl = {'MESSAGE' : ['include this' ]}
@@ -154,7 +155,8 @@ def test_regexp(self):
154155
155156 def test_priority (self ):
156157 exclusion = Exclusion ({'PRIORITY' : 'err' })
157- assert exclusion .matches ({'PRIORITY' : 3 })
158+ priority_type = journal .DEFAULT_CONVERTERS .get ('PRIORITY' , str )
159+ assert exclusion .matches ({'PRIORITY' : priority_type (3 )})
158160
159161 def test_str_without_comment (self ):
160162 excl = {'MESSAGE' : ['exclude this' ]}
@@ -216,10 +218,11 @@ def test_no_exclusions(self):
216218 assert lines == [entry ['MESSAGE' ] for entry in entries ]
217219
218220 def test_exclusion (self ):
221+ priority_type = journal .DEFAULT_CONVERTERS .get ('PRIORITY' , str )
219222 entries = [{'MESSAGE' : 'exclude this' ,
220223 'SYSLOG_IDENTIFIER' : 'from here' },
221224
222- {'PRIORITY' : '6' ,
225+ {'PRIORITY' : priority_type ( 6 ) ,
223226 'MESSAGE' : 'exclude this too' },
224227
225228 {'MESSAGE' : 'message 1' ,
0 commit comments