浏览代码

Create basic test to fake_user_agent

pull/3011/head
Matheus Felipe 2 年前
父节点
当前提交
1866c0d83a
找不到此签名对应的密钥 GPG 密钥 ID: AA785C523274872F
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. +5
    -0
      scripts/tests/test_validate_links.py

+ 5
- 0
scripts/tests/test_validate_links.py 查看文件

@@ -3,6 +3,7 @@
import unittest

from validate.links import find_links_in_text
from validate.links import fake_user_agent
from validate.links import get_host_from_link
from validate.links import has_cloudflare_protection

@@ -63,6 +64,10 @@ class TestValidateLinks(unittest.TestCase):
find_links_in_text(1)
find_links_in_text(True)
def test_if_fake_user_agent_has_a_str_as_return(self):
user_agent = fake_user_agent()
self.assertIsInstance(user_agent, str)

def test_get_host_from_link(self):
links = [
'example.com',


正在加载...
取消
保存