Ejemplo n.º 1
0
    def test_good(self):
        """One or more answers is fine"""
        AnswerFactory.create_batch(2)

        result = CheckAnyAnswers.check()
        assert result.severity == SEVERITY_LOW
        assert result.summary == '2 answers in last 24 hours.'
        assert result.output == '2'
Ejemplo n.º 2
0
 def test_bad(self):
     """No answers is very bad"""
     result = CheckAnyAnswers.check()
     assert result.severity == SEVERITY_HIGH
     assert result.summary == '0 answers in last 24 hours.'
     assert result.output == '0'