Esempio n. 1
0
 def test_tweetsec_replace_smaller_substring_english_words(self):
     #test that password_eval module function replace_english_words, will replace smaller substrings if it's an english word (doesn't have to be the whole substring)
     replace_pw = password_eval.replace_english_words("1boxttt34")
     self.assertEqual(replace_pw, "1pttt34")
Esempio n. 2
0
 def test_tweetsec_replace_foreign_words(self):
     #test that password_eval module function replace_english_words, will NOT replace foreign words
     replace_pw = password_eval.replace_english_words("12roja34")
     self.assertEqual(replace_pw, "12roja34")
Esempio n. 3
0
 def test_tweetsec_replace_only_english_words(self):
     #test that password_eval module function replace_english_words, will ONLY replace real english words
     replace_pw = password_eval.replace_english_words("1tttt34")
     self.assertEqual(replace_pw, "1tttt34")
Esempio n. 4
0
 def test_tweetsec_replace_prefer_longer_english_substring_words(self):
     #test that password_eval module function replace_english_words, will prefer LONGER english substring words (when whole substring is not a word itself like "password")
     replace_pw = password_eval.replace_english_words("1zboyztable34")
     self.assertEqual(replace_pw, "1zboyzp34")
Esempio n. 5
0
 def test_tweetsec_replace_english_words(self):
     #test that password_eval module function replace_english_words, will replace any complete English words in the text with any lower-case letter
     #this will prefer longer replacements
     replace_pw = password_eval.replace_english_words("12password34")
     self.assertEqual(replace_pw, "12p34")
Esempio n. 6
0
 def test_tweetsec_replace_smaller_substring_english_words(self):
     #test that password_eval module function replace_english_words, will replace smaller substrings if it's an english word (doesn't have to be the whole substring)
     replace_pw = password_eval.replace_english_words("1boxttt34")
     self.assertEqual(replace_pw, "1pttt34")
Esempio n. 7
0
 def test_tweetsec_replace_smaller_substring_english_words_greater_than_zero_index(self):
     #test that password_eval module function replace_english_words, will replace smaller substrings if it's an english word, if the smaller substring does NOT start at the beginning of the bigger string (index>0)
     replace_pw = password_eval.replace_english_words("1sssboxttt34")
     self.assertEqual(replace_pw, "1ssspttt34")
Esempio n. 8
0
 def test_tweetsec_replace_only_english_words(self):
     #test that password_eval module function replace_english_words, will ONLY replace real english words
     replace_pw = password_eval.replace_english_words("1tttt34")
     self.assertEqual(replace_pw, "1tttt34")
Esempio n. 9
0
 def test_tweetsec_replace_foreign_words(self):
     #test that password_eval module function replace_english_words, will NOT replace foreign words
     replace_pw = password_eval.replace_english_words("12roja34")
     self.assertEqual(replace_pw, "12roja34")
Esempio n. 10
0
 def test_tweetsec_replace_english_words(self):
     #test that password_eval module function replace_english_words, will replace any complete English words in the text with any lower-case letter
     #this will prefer longer replacements
     replace_pw = password_eval.replace_english_words("12password34")
     self.assertEqual(replace_pw, "12p34")
Esempio n. 11
0
 def test_tweetsec_replace_prefer_longer_english_substring_words(self):
     #test that password_eval module function replace_english_words, will prefer LONGER english substring words (when whole substring is not a word itself like "password")
     replace_pw = password_eval.replace_english_words("1zboyztable34")
     self.assertEqual(replace_pw, "1zboyzp34")
Esempio n. 12
0
 def test_tweetsec_replace_smaller_substring_english_words_greater_than_zero_index(
         self):
     #test that password_eval module function replace_english_words, will replace smaller substrings if it's an english word, if the smaller substring does NOT start at the beginning of the bigger string (index>0)
     replace_pw = password_eval.replace_english_words("1sssboxttt34")
     self.assertEqual(replace_pw, "1ssspttt34")