mirror of
https://github.com/FranP-code/public-apis.git
synced 2025-10-13 00:03:04 +00:00
Remove setUp method
This commit is contained in:
@@ -5,10 +5,10 @@ import unittest
|
|||||||
from validate.links import find_links_in_text
|
from validate.links import find_links_in_text
|
||||||
|
|
||||||
|
|
||||||
class TestValidateLinks(unittest.TestCase):
|
class TestValidateLinks(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def test_find_link_in_text(self):
|
||||||
self.text = """
|
text = """
|
||||||
# this is valid
|
# this is valid
|
||||||
|
|
||||||
http://example.com?param1=1¶m2=2#anchor
|
http://example.com?param1=1¶m2=2#anchor
|
||||||
@@ -27,10 +27,8 @@ class TestValidateLinks(unittest.TestCase):
|
|||||||
https//example.com
|
https//example.com
|
||||||
https//.com
|
https//.com
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def test_find_link_in_text(self):
|
links = find_links_in_text(text)
|
||||||
links = find_links_in_text(self.text)
|
|
||||||
|
|
||||||
self.assertIsInstance(links, list)
|
self.assertIsInstance(links, list)
|
||||||
self.assertEqual(len(links), 7)
|
self.assertEqual(len(links), 7)
|
||||||
|
|||||||
Reference in New Issue
Block a user