Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubermagal committed Nov 14, 2024
1 parent 6179626 commit 9ecaaef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand All @@ -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):
Expand Down

0 comments on commit 9ecaaef

Please sign in to comment.