1
mirror of https://github.com/public-apis/public-apis synced 2024-11-21 10:04:15 +01:00

Create basic test to fake_user_agent

This commit is contained in:
Matheus Felipe 2022-01-13 16:45:14 -03:00
parent b62683f96e
commit 1866c0d83a
No known key found for this signature in database
GPG Key ID: AA785C523274872F

View File

@ -3,6 +3,7 @@
import unittest import unittest
from validate.links import find_links_in_text 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 get_host_from_link
from validate.links import has_cloudflare_protection from validate.links import has_cloudflare_protection
@ -63,6 +64,10 @@ class TestValidateLinks(unittest.TestCase):
find_links_in_text(1) find_links_in_text(1)
find_links_in_text(True) 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): def test_get_host_from_link(self):
links = [ links = [
'example.com', 'example.com',