Beispiel #1
0
 def test_is_signed_detects_unsigned_files(self, tmpdir):
     # we can tell if a wordlist is not signed
     in_file = tmpdir.mkdir("work").join("mywordlist")
     in_file.write("a\nb\n")
     with open(in_file.strpath, 'r') as fd:
         w_list = WordList(fd)
         w_list.fd = fd
         result = w_list.is_signed()
     assert result is False
Beispiel #2
0
 def test_is_signed_detects_signed_files(self):
     # we recognize signed wordlists
     in_path = os.path.join(
         os.path.dirname(__file__), "sample_signed_wordlist.asc")
     with open(in_path, "r") as fd:
         w_list = WordList(fd)
         w_list.fd = fd
         result = w_list.is_signed()
     assert result is True
Beispiel #3
0
 def test_is_signed_detects_unsigned_files(self, tmpdir):
     # we can tell if a wordlist is not signed
     in_file = tmpdir.mkdir("work").join("mywordlist")
     in_file.write("a\nb\n")
     with open(in_file.strpath, 'r') as fd:
         w_list = WordList(fd)
         w_list.fd = fd
         result = w_list.is_signed()
     assert result is False
Beispiel #4
0
 def test_is_signed_detects_signed_files(self):
     # we recognize signed wordlists
     in_path = os.path.join(
         os.path.dirname(__file__), "sample_signed_wordlist.asc")
     with open(in_path, "r") as fd:
         w_list = WordList(fd)
         w_list.fd = fd
         result = w_list.is_signed()
     assert result is True
Beispiel #5
0
 def test_is_signed_detects_unsigned_files(self, tmpdir):
     # we can tell if a wordlist is not signed
     in_file = tmpdir.mkdir("work").join("mywordlist")
     in_file.write("a\nb\n")
     w_list = WordList(in_file.strpath)
     assert w_list.is_signed() is False
Beispiel #6
0
 def test_is_signed_detects_signed_files(self):
     # we recognize signed wordlists
     in_path = os.path.join(
         os.path.dirname(__file__), "sample_signed_wordlist.asc")
     w_list = WordList(in_path)
     assert w_list.is_signed() is True