import unittest from yaml import safe_load from core.entry_filter import filter_entry test_config = ''' { "test_style_block": { "agents": { "test": { "title": "🌐AI 翻译", "style_block": true, "allow_list": , "deny_list": } } }, "test_allow_list": { "agents": { "test": { "title": "🌐AI 翻译", "style_block": false, "allow_list": [ "https://9to5mac.com/", "https://home.kpmg/*" ], "deny_list": } } }, "test_deny_list": { "agents": { "test": { "title": "🌐AI 翻译", "style_block": false, "allow_list": , "deny_list": [ "https://9to5mac.com/", "https://home.kpmg/cn/zh/home/insights.html" ] } } }, "test_None": { "agents": { "test": { "title": "🌐AI 翻译", "style_block": false, "allow_list": , "deny_list": } } } } ''' test_entries = ''' { "test_style_block": { "entry": { "content": '