mirror of
https://github.com/netzbegruenung/green-spider.git
synced 2024-05-01 16:44:51 +02:00
Add test for domain_variations
This commit is contained in:
parent
f6edfd2ce6
commit
4b7537fd17
20
checks/domain_variations_test.py
Normal file
20
checks/domain_variations_test.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
import unittest
|
||||
from pprint import pprint
|
||||
|
||||
from checks import domain_variations
|
||||
from checks.config import Config
|
||||
|
||||
|
||||
class TestDomainVariations(unittest.TestCase):
|
||||
|
||||
def test_simple(self):
|
||||
url = 'http://example.org/'
|
||||
config = Config(urls=[url])
|
||||
checker = domain_variations.Checker(config=config, previous_results={})
|
||||
checker.run()
|
||||
config_after = checker.config
|
||||
|
||||
self.assertEqual(config_after.urls, ['http://example.org/', 'http://www.example.org/'])
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Loading…
Reference in a new issue