def test_scoring_video_files(self):
"""
Test that we correctly score video files
"""
sf = NNTPSimpleFilter()
entry = copy(self.template_entry)
# Expected Score
score = 25
# Test against video files:
for e in [ 'avi', 'mpeg', 'mpg', 'mp4', 'mov', 'mkv', 'asf',
'ogg', 'iso', 'rm' ]:
entry['subject'] = 'What.A.Great.Show (1/1) ' +\
'"what.a.great.show.%s" Yenc (1/1)' % e
assert sf.score(**entry) == score
# now test that we can support .??? extensions after
# the initial one
for i in range(1000):
entry['subject'] = 'What.A.Great.Show (1/1) ' +\
'"what.a.great.show.%s.%.3d" Yenc (1/1)' % (e, i)
assert sf.score(**entry) == score
评论列表
文章目录