From 9ecaaef57e45ec8c3785575e08f89e0f3a8eab36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Glauber=20Magalh=C3=A3es?= Date: Thu, 14 Nov 2024 13:40:25 -0300 Subject: [PATCH] fix unit tests --- tests/tests.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/tests.py b/tests/tests.py index 7f39f55..3c8aae3 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -12,7 +12,6 @@ def setUp(self): unicode_combinations_file = Path(__file__).resolve().parent.parent / "./src/unicode_combinations.json" unicode_combinations = load_unicode_combinations_from_file(unicode_combinations_file) self.analyzer = HomographAnalyzer( - # unicode_combinations, show_domains_only=False, check_dns=False unicode_combinations, show_domains_only=False, show_mixed_only=False, show_registered_only=True, json_format=False ) @@ -24,8 +23,10 @@ def test_check_domain_registration(self, mock_gethostbyname): def test_generate_combinations(self): result = self.analyzer.generate_combinations('x') - print("result", result) - self.assertEqual(result, ([['x', 'х', 'ҳ']], ['ҳ', 'х'], ['CYRILLIC'])) + self.assertEqual(len(result), 3) + self.assertCountEqual(result[0][0], ['x', 'х', 'ҳ']) + self.assertCountEqual(result[1], ['ҳ', 'х']) + self.assertCountEqual(result[2], ['CYRILLIC']) @patch('builtins.print') def test_analyze_domain(self, mock_print):