mirror of
https://github.com/netzbegruenung/green-spider.git
synced 2024-05-01 16:44:51 +02:00
Add simple unit test for spider.check_and_rate_site
This commit is contained in:
parent
078a092b31
commit
041ecaaefd
26
spider/spider_test.py
Normal file
26
spider/spider_test.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
import unittest
|
||||
|
||||
from spider.spider import check_and_rate_site
|
||||
|
||||
from pprint import pprint
|
||||
|
||||
class TestSpiderr(unittest.TestCase):
|
||||
|
||||
def test_url1(self):
|
||||
|
||||
entry = {
|
||||
"url": "https://httpbin.org/html",
|
||||
"type": "type",
|
||||
"state": "state",
|
||||
"level": "level",
|
||||
"district": "district",
|
||||
"city": "city",
|
||||
}
|
||||
|
||||
url = "https://httpbin.org/html"
|
||||
result = check_and_rate_site(entry)
|
||||
|
||||
self.assertEqual(result["input_url"], url)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Loading…
Reference in a new issue