From d5b9db24ffbd4d4c5ba17e6f0be5b266224333dc Mon Sep 17 00:00:00 2001 From: Iain Learmonth Date: Thu, 30 Mar 2023 15:55:33 +0100 Subject: [PATCH] test(block): adds test for block_external parsing --- tests/block/test_block_external.py | 53 ++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 tests/block/test_block_external.py diff --git a/tests/block/test_block_external.py b/tests/block/test_block_external.py new file mode 100644 index 0000000..f005048 --- /dev/null +++ b/tests/block/test_block_external.py @@ -0,0 +1,53 @@ +import unittest + +from app.terraform.block_external import BlockExternalAutomation + + +class TestBlockExternalAutomation(unittest.TestCase): + def test_parse(self): + content = b""" + + + + + + + + Mirrors Availability + + +
+
+
+

RFE/RL Mirror Sites Availability

+

Farajaland

+

Updated at 2023-03-30 15:46:03 CET

+
+ + + + + + + + + + + + + + + +
ServiceHostnameError
example.comexample.netConnection Error
+
+
+
+
+ + + + """ + block_external = BlockExternalAutomation() + block_external._content = content + block_external.parse() + self.assertEqual(block_external.patterns, ['https://example.net'])