From d184716523328d4f33efd4b94379ea7b496e50d8 Mon Sep 17 00:00:00 2001 From: aristotelis gkithkopoulos Date: Sun, 8 May 2022 14:22:18 +0300 Subject: [PATCH] add unittest for multiple username --- sherlock/tests/test_multiple_usernames.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sherlock/tests/test_multiple_usernames.py diff --git a/sherlock/tests/test_multiple_usernames.py b/sherlock/tests/test_multiple_usernames.py new file mode 100644 index 00000000..12aac41f --- /dev/null +++ b/sherlock/tests/test_multiple_usernames.py @@ -0,0 +1,17 @@ +import imp +import unittest +import sys +sys.path.append('../') +import sherlock as sh + +checksymbols = [] +checksymbols = ["_", "-", "."] + +class TestMulripleUsernames(unittest.TestCase): + def test_area(self): + test_usernames = ["test{?}test" , "test{?feo" , "test"] + for name in test_usernames: + if(sh.CheckForParameter(name)): + self.assertAlmostEqual(sh.MultipleUsernames(name), ["test_test" , "test-test" , "test.test"]) + else: + self.assertAlmostEqual(name, name) \ No newline at end of file