コード例 #1
0
ファイル: test_tweetsec.py プロジェクト: mrkrlli/tweetsec
 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")
コード例 #2
0
ファイル: test_tweetsec.py プロジェクト: mrkrlli/tweetsec
 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")
コード例 #3
0
ファイル: test_tweetsec.py プロジェクト: mrkrlli/tweetsec
 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")
コード例 #4
0
ファイル: test_tweetsec.py プロジェクト: mrkrlli/tweetsec
 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")
コード例 #5
0
ファイル: test_tweetsec.py プロジェクト: mrkrlli/tweetsec
 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")
コード例 #6
0
ファイル: test_tweetsec.py プロジェクト: mrkrlli/tweetsec
 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")
コード例 #7
0
ファイル: test_tweetsec.py プロジェクト: mrkrlli/tweetsec
 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")
コード例 #8
0
ファイル: test_tweetsec.py プロジェクト: mrkrlli/tweetsec
 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")
コード例 #9
0
ファイル: test_tweetsec.py プロジェクト: mrkrlli/tweetsec
 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")
コード例 #10
0
ファイル: test_tweetsec.py プロジェクト: mrkrlli/tweetsec
 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")
コード例 #11
0
ファイル: test_tweetsec.py プロジェクト: mrkrlli/tweetsec
 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")
コード例 #12
0
ファイル: test_tweetsec.py プロジェクト: mrkrlli/tweetsec
 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")