Ejemplo n.º 1
0
 def test_filter_errors_no_errors(self):
     errors = [
         Error(INFO, 'msg3'),
         Error(DEBUG, 'msg4'),
         Error(NOTSET, 'msg4'),
     ]
     assert [] == cmd.filter_errors(errors)
Ejemplo n.º 2
0
 def test_filter_errors_with_min(self):
     errors = [
         Error(CRITICAL, 'msg1'),
         Error(ERROR, 'msg2'),
         Error(INFO, 'msg3'),
         Error(WARNING, 'msg4'),
         Error(DEBUG, 'msg4'),
         Error(NOTSET, 'msg4'),
     ]
     expected = [
         Error(CRITICAL, 'msg1'),
     ]
     assert expected == cmd.filter_errors(errors, CRITICAL)
Ejemplo n.º 3
0
 def test_filter_errors_none(self):
     assert [] == cmd.filter_errors([])