Exemple #1
0
 def test_find_words_using_and_fail(self):
     parser = logfind.return_parser()
     parsed_arguments = parser.parse_args(self.arguments_and)
     assert_false(logfind.find_words(parsed_arguments, b"this is a "))
Exemple #2
0
 def test_find_words_using_or(self):
     parser = logfind.return_parser()
     parsed_arguments = parser.parse_args(self.arguments_or)
     assert_true(logfind.find_words(parsed_arguments, b"this is a test"))
Exemple #3
0
 def test_find_words_using_or_fail(self):
     parser = logfind.return_parser()
     parsed_arguments = parser.parse_args(self.arguments_or)
     assert_false(logfind.find_words(parsed_arguments, b"blah blah blah"))
Exemple #4
0
 def test_return_parsar(self):
     parser = logfind.return_parser()
     with assert_raises(SystemExit):
         parser.parse_args()
         parser.parse_args(["-o"])